fawadbutt
Member level 3
- Joined
- Oct 29, 2010
- Messages
- 61
- Helped
- 4
- Reputation
- 8
- Reaction score
- 4
- Trophy points
- 1,288
- Location
- Lahore, Pakistan, Pakistan
- Activity points
- 1,754
i m programming in 16f676 using hi tech 9.83 (pro)
i am writing the code it not working ,i jus on off led,
here is my code its so simple but or working...plz
find the error or give me just a simple on/off led working example on protuse ,
Complier Hitech 9.83 (PRO),
Device pic16f676
Language C
i am writing the code it not working ,i jus on off led,
Code:
#include<pic.h>
#include<htc.h>
#define _XTAL_FREQ 4000000
__CONFIG(0x3f32);
//__CONFIG (0x3FB5);
void pic_init(void);
#define led0 RC0
#define led1 RC1
#define led2 RC2
#define led3 RC3
#define led4 RC4
#define led5 RC5
void main()
{
pic_init();
while(1)
{
led0=0;
led1=0;
__delay_ms(500);
led0=1;
led1=1;
}
}
void pic_init(void)
{
//TRISA=PORTA=0;//RB7-RB3 USE LCD
//OSCCAL = 0b000000;
//ANSEL = 0b00000000;
TRISC=0;
PORTC=0;
//TRISA0=0xff;//USE ADC CHANNEL 1
}
here is my code its so simple but or working...plz
find the error or give me just a simple on/off led working example on protuse ,
Complier Hitech 9.83 (PRO),
Device pic16f676
Language C