Sign in

username:

password:



Not a member?

Search piclist



Search tips

Subscribe to piclist



piclist by Keywords

12F675 | 16F628 | 16F84 | 16f877 | 16F877A | 16F88 | 18F458 | ADC | AVR | Bootloader | CAN | CCS | CRC | EAGLE | EEPROM | ICD | ICSP | IDE | JDM | LED | Macros | Microchip | MPLAB | PCB-CAD | PIC10F | Pic12f675 | PIC16F84 | PIC16F84A | PIC16F877 | PIC18 | PIC18F452 | PicBasic | PICC | PICSTART | PWM | RS-485 | RS232 | SMT | SPI | UART | USART | USB | Wireless | Wisp628 | Xilinx

Ads

Discussion Groups

Discussion Groups | Piclist | CAN SOMEONE HELP ME WITH MY PIC16F 877A (MY FINAL PROJECT)

A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.

CAN SOMEONE HELP ME WITH MY PIC16F 877A (MY FINAL PROJECT) - jordan - Apr 17 11:19:00 2008

ACTUALLY I GOT THIS PROGRAM FROM MY SENIOR REPORT BUT I DONT KNOW
WHICH PROGRAMMING LANGGUAGE HE/SHE USE SO PLZ HELP ME. THX
#include "pic.h"
#include "htc.h"
#include "delay.h"

unsigned char light[8],v,dummy;

void man(void);
void pc(void);
void send(unsigned char con);
void feedback(unsigned char light1);
main()
{
unsigned char cnt1;
TRISA = 0x3F;
TRISB=0x81;
TRISC= 0x00;
TRISD=0xFF;
TRISE = 0x00;
ADCON1 = 0x06;

GIE=1;
RBIE=1;
INTE=1;
RBPU=0;

for (cnt1;cnt1<8;cnt1++)
{
light[cnt1]=1;
PORTE=cnt1;
send(1);

}
while(1)
{
asm ("SLEEP");
if(v==0)
man();
else
pc();
}

}

static void interrupt
isr()
{
if(INTF)
{
v=0;
INTF=0;
}

if(RBIF)
{
v=1;
dummy=PORTB;
RBIF=0;
}
}

void man(void)
{
unsigned char temp;
PORTE =PORTA;
temp=PORTA;
light[temp]=1-light[temp];
send(light[temp]);
feedback(light[temp]);

}

void pc(void)
{
unsigned char temp1;
temp1= PORTD;
PORTE=temp1;
light[temp1]=1-light[temp1];
send(light[temp1]);
feedback(light[temp1]);

}

void send(unsigned char con)
{
RC1=con;
RC0=0;
RC0=1;
}

void feedback(unsigned char light1)
{
RC5=light1;
}

------------------------------------

to unsubscribe, go to http://www.yahoogroups.com and follow the instructions



(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )


Re: CAN SOMEONE HELP ME WITH MY PIC16F 877A (MY FINAL PROJECT) - Dennis Clark - Apr 17 12:30:46 2008

YOU DON'T HAVE TO USE CAPS TO GET OUR ATTENTION.

In fact, on the 'net it is considered rude and childish and can get you
ignored.

Now on to useful information. The program is in C. Since it is for the
PIC 16F series I'm guessing that it is Hitech C. They have a student demo
edition, which this looks like it should work in. Try that with MPLAB.
Before you come back with "I don't know what Hitech is or what "C" is",
please Google for information and do your homework. If you have specific
questions we'll be happy to help.

DLC

> ACTUALLY I GOT THIS PROGRAM FROM MY SENIOR REPORT BUT I DONT KNOW
> WHICH PROGRAMMING LANGGUAGE HE/SHE USE SO PLZ HELP ME. THX
> #include "pic.h"
> #include "htc.h"
> #include "delay.h"
>
> unsigned char light[8],v,dummy;
>
> void man(void);
> void pc(void);
> void send(unsigned char con);
> void feedback(unsigned char light1);
> main()
> {
> unsigned char cnt1;
> TRISA = 0x3F;
> TRISB=0x81;
> TRISC= 0x00;
> TRISD=0xFF;
> TRISE = 0x00;
> ADCON1 = 0x06;
>
> GIE=1;
> RBIE=1;
> INTE=1;
> RBPU=0;
> for (cnt1;cnt1<8;cnt1++)
> {
> light[cnt1]=1;
> PORTE=cnt1;
> send(1);
>
> }
> while(1)
> {
> asm ("SLEEP");
> if(v==0)
> man();
> else
> pc();
> }
>
> }
>
> static void interrupt
> isr()
> {
> if(INTF)
> {
> v=0;
> INTF=0;
> }
>
> if(RBIF)
> {
> v=1;
> dummy=PORTB;
> RBIF=0;
> }
> }
>
> void man(void)
> {
> unsigned char temp;
> PORTE =PORTA;
> temp=PORTA;
> light[temp]=1-light[temp];
> send(light[temp]);
> feedback(light[temp]);
>
> }
>
> void pc(void)
> {
> unsigned char temp1;
> temp1= PORTD;
> PORTE=temp1;
> light[temp1]=1-light[temp1];
> send(light[temp1]);
> feedback(light[temp1]);
>
> }
>
> void send(unsigned char con)
> {
> RC1=con;
> RC0=0;
> RC0=1;
> }
>
> void feedback(unsigned char light1)
> {
> RC5=light1;
> }
>
> ------------------------------------
>
> to unsubscribe, go to http://www.yahoogroups.com and follow the
> instructions



(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

RE: [other] [Spam] CAN SOMEONE HELP ME WITH MY PIC16F 877A (MY FINAL PROJECT) - Michael Heins - Apr 28 19:28:04 2008

Jordan;

This is ANSI C language. Check out www.microchip.com
for the mplab student edition. You will need
this to begin programming the PIC of your choice. Also you will need the
C18 compiler. You can also find a trial/student edition of this on
microchips website. Typing these into google with the keyword 'download'
may also get you some direct links. I've food microchips search facility on
their website to be hard to use sometimes.

good luck,

-mike

-----Original Message-----
From: p...@yahoogroups.com [mailto:p...@yahoogroups.com] On Behalf Of
jordan
Sent: Monday, March 17, 2008 3:15 PM
To: p...@yahoogroups.com
Subject: [other] [Spam] [piclist] CAN SOMEONE HELP ME WITH MY PIC16F 877A
(MY FINAL PROJECT)

ACTUALLY I GOT THIS PROGRAM FROM MY SENIOR REPORT BUT I DONT KNOW
WHICH PROGRAMMING LANGGUAGE HE/SHE USE SO PLZ HELP ME. THX

#include "pic.h"
#include "htc.h"
#include "delay.h"

unsigned char light[8],v,dummy;

void man(void);
void pc(void);
void send(unsigned char con);
void feedback(unsigned char light1);

main()
{
unsigned char cnt1;
TRISA = 0x3F;
TRISB=0x81;
TRISC= 0x00;
TRISD=0xFF;
TRISE = 0x00;
ADCON1 = 0x06;

GIE=1;
RBIE=1;
INTE=1;
RBPU=0;

for (cnt1;cnt1<8;cnt1++)
{
light[cnt1]=1;
PORTE=cnt1;
send(1);

}
while(1)
{
asm ("SLEEP");
if(v==0)
man();
else
pc();
}

}

static void interrupt
isr()
{
if(INTF)
{
v=0;
INTF=0;
}

if(RBIF)
{
v=1;
dummy=PORTB;
RBIF=0;
}
}

void man(void)
{
unsigned char temp;
PORTE =PORTA;
temp=PORTA;
light[temp]=1-light[temp];
send(light[temp]);
feedback(light[temp]);

}

void pc(void)
{
unsigned char temp1;
temp1= PORTD;
PORTE=temp1;
light[temp1]=1-light[temp1];
send(light[temp1]);
feedback(light[temp1]);

}

void send(unsigned char con)
{
RC1=con;
RC0=0;
RC0=1;
}

void feedback(unsigned char light1)
{
RC5=light1;
}



(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: CAN SOMEONE HELP ME WITH MY PIC16F 877A (MY FINAL PROJECT) - Hasan PARLAK - Apr 28 19:28:23 2008

Pic C :D:D

On 17/03/2008, jordan wrote:
>
> ACTUALLY I GOT THIS PROGRAM FROM MY SENIOR REPORT BUT I DONT KNOW
> WHICH PROGRAMMING LANGGUAGE HE/SHE USE SO PLZ HELP ME. THX
>
> #include "pic.h"
> #include "htc.h"
> #include "delay.h"
>
> unsigned char light[8],v,dummy;
>
> void man(void);
> void pc(void);
> void send(unsigned char con);
> void feedback(unsigned char light1);
>
> main()
> {
> unsigned char cnt1;
> TRISA = 0x3F;
> TRISB=0x81;
> TRISC= 0x00;
> TRISD=0xFF;
> TRISE = 0x00;
> ADCON1 = 0x06;
>
> GIE=1;
> RBIE=1;
> INTE=1;
> RBPU=0;
>
> for (cnt1;cnt1<8;cnt1++)
> {
> light[cnt1]=1;
> PORTE=cnt1;
> send(1);
>
> }
> while(1)
> {
> asm ("SLEEP");
> if(v==0)
> man();
> else
> pc();
> }
>
> }
>
> static void interrupt
> isr()
> {
> if(INTF)
> {
> v=0;
> INTF=0;
> }
>
> if(RBIF)
> {
> v=1;
> dummy=PORTB;
> RBIF=0;
> }
> }
>
> void man(void)
> {
> unsigned char temp;
> PORTE =PORTA;
> temp=PORTA;
> light[temp]=1-light[temp];
> send(light[temp]);
> feedback(light[temp]);
>
> }
>
> void pc(void)
> {
> unsigned char temp1;
> temp1= PORTD;
> PORTE=temp1;
> light[temp1]=1-light[temp1];
> send(light[temp1]);
> feedback(light[temp1]);
>
> }
>
> void send(unsigned char con)
> {
> RC1=con;
> RC0=0;
> RC0=1;
> }
>
> void feedback(unsigned char light1)
> {
> RC5=light1;
> }
>



(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )