areebqaisar
Newbie level 2
Hello All.
I was working on a Project, where I had to do some RS-232 Communication between a PC and a PIC16F877A.
But before going for the RS232, Currently I am Stuck on the Timing issue.
I am using PIC16F877A, and I've tried 12MHz and 20MHz External Crystal with 30pF Capacitors, and programmed the Controller for a Blinking LED Code.
Well, I am pretty much sure that There is nothing wrong with the Code, and its working in Proteus.
But on a Real Hardware, the Blinking rate is way too slow.
I have set a Delay of 1s in my Code. but the actual delay is something like 6 seconds.
Moreover, I have set the Clock Option to "XT"
As per the datasheet, we need to set the clock option to "HS" when using a Crystal above 4MHz, but when I set it to "HS",
the controller does't work at all !.... It just powers up with all the LEDs ON and than nothing happens.
However, with XT, the LEDs do blink but the blinking rate is too slow....
Can anyone please help me out ?
I was working on a Project, where I had to do some RS-232 Communication between a PC and a PIC16F877A.
But before going for the RS232, Currently I am Stuck on the Timing issue.
I am using PIC16F877A, and I've tried 12MHz and 20MHz External Crystal with 30pF Capacitors, and programmed the Controller for a Blinking LED Code.
Well, I am pretty much sure that There is nothing wrong with the Code, and its working in Proteus.
But on a Real Hardware, the Blinking rate is way too slow.
I have set a Delay of 1s in my Code. but the actual delay is something like 6 seconds.
Moreover, I have set the Clock Option to "XT"
As per the datasheet, we need to set the clock option to "HS" when using a Crystal above 4MHz, but when I set it to "HS",
the controller does't work at all !.... It just powers up with all the LEDs ON and than nothing happens.
However, with XT, the LEDs do blink but the blinking rate is too slow....
Can anyone please help me out ?