problem in blinking led with 16f877a

Status
Not open for further replies.
I don't use mikroC.... The code is fine then... Must be the hardware.... I believe there are options and settings in the MickoC IDE...

Sorry... But I use Microchips own compilers...
 

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

Code:
PORTB =~PORTB;
 
Sorry... But your code definitely said toggle.

Have you got a schematic to show me how the LED's are connected...
 
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?
 
Have you bought mikroC or is it the free trial..... If you use MPLAB IDE and Hi-tech / XC8... There are student versions for free There are more people here that use MPLAB than MikroE...
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…