Tinkerer_of_Things
Newbie level 3
Greetings.
Im attempting to connect my first pic and have it blink an led with a simple program i wrote. However its not working and i could use some help.
Everything works when i connect it on proteus 8 however when i try connect on breadboard it doesn't do anything. I dont know if some crystal is needed to be connected to OSC1 and OSC2? I connected 5V to both Vdd pins and ground to both Vss. and an led to pin 15 the RC0.
I did manage to use MPLABxIPE to program the pic so im glad i at least did something right
I'm using a PIC16F877a and here is the code i wrote:
Any guidance is much appreciated.
Im attempting to connect my first pic and have it blink an led with a simple program i wrote. However its not working and i could use some help.
Everything works when i connect it on proteus 8 however when i try connect on breadboard it doesn't do anything. I dont know if some crystal is needed to be connected to OSC1 and OSC2? I connected 5V to both Vdd pins and ground to both Vss. and an led to pin 15 the RC0.
I did manage to use MPLABxIPE to program the pic so im glad i at least did something right
I'm using a PIC16F877a and here is the code i wrote:
Code:
void main()
{
PortC = 0;
TrisC = 0b00000000;
ADCON1 = 7;
CMCON = 7;
while(1)
{
RC0_bit = 1;
Delay_ms(1000);
RC0_bit = 0;
Delay_ms(1000);
}
}