problem in blinking led with 16f877a


I have noticed that you are doing nothing in your code.... To toggle the port you should use..

Code:
PORTB =~PORTB;
 
If your circuit is the same as this (with a crystal) it should work..... On a side note.. What speed is your crystal....... If it's 4mhz or below, you need to specify XT crystal setting in your IDE before compilation... If its above, you need to specify HS
 

yeah its 4mhz,& i have made that before compilation
do u have any hex file for led at portb?
 
Tons... In my signature..... They are based on Nigel's ASM tutorials and use the same boards.... You build The dev board laid out in Nigel's Pic tutorial site and run all my examples on them.

I also did a MPLAB IDE tutorial with basically the same code as you want.... https://www.electro-tech-online.com/threads/eb08.582/
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…