Jan 21, 2016 #1 T thandana Junior Member level 1 Joined Nov 27, 2014 Messages 19 Helped 0 Reputation 0 Reaction score 0 Trophy points 1 Activity points 367 Hi, I have a simple circuit that i created on the proteus8.1 simulator and have written code to flash LED connected to the PIC16F84A device. When i simulate, the LED is NOT flashing and NO ERRORS on the simulator. Please assist Code: void main() { TRISB=0b11111101; while (1) { PORTB.f1=1; delay_ms(500); PORTB.f1=0; delay_ms(500); } } Attachments LED.pdf 249.8 KB · Views: 122
Hi, I have a simple circuit that i created on the proteus8.1 simulator and have written code to flash LED connected to the PIC16F84A device. When i simulate, the LED is NOT flashing and NO ERRORS on the simulator. Please assist Code: void main() { TRISB=0b11111101; while (1) { PORTB.f1=1; delay_ms(500); PORTB.f1=0; delay_ms(500); } }
Jan 21, 2016 #2 betwixt Super Moderator Staff member Joined Jul 4, 2009 Messages 16,265 Helped 5,140 Reputation 10,309 Reaction score 5,129 Trophy points 1,393 Location Aberdyfi, West Wales, UK Activity points 137,651 What is ".f1" ? Try replacing it with just the number 1, "PORTB.1" and see what happens. In a real program you would also configure the clock source and other registers, I'm not sure if MikroC and Proteus respect that though. Brian.
What is ".f1" ? Try replacing it with just the number 1, "PORTB.1" and see what happens. In a real program you would also configure the clock source and other registers, I'm not sure if MikroC and Proteus respect that though. Brian.
Jan 28, 2016 #3 andre_luis Super Moderator Staff member Joined Nov 7, 2006 Messages 9,595 Helped 1,190 Reputation 2,399 Reaction score 1,208 Trophy points 1,403 Location Brazil Activity points 55,686 At the schematic attached, there is nothing connected to the Oscillator pins. According to datasheet, there is no internal oscillator available for this uC in particular.
At the schematic attached, there is nothing connected to the Oscillator pins. According to datasheet, there is no internal oscillator available for this uC in particular.
Jan 28, 2016 #4 T thandana Junior Member level 1 Joined Nov 27, 2014 Messages 19 Helped 0 Reputation 0 Reaction score 0 Trophy points 1 Activity points 367 Hi, This can be closed now. I connected the oscillator and applied 5V and now works OK. Thanks for the help.
Hi, This can be closed now. I connected the oscillator and applied 5V and now works OK. Thanks for the help.