i wrote a program in mikro c & put it into 16f877a, led didnt glow but when i touch one of the probe of multimeter with vdd pin of controller & other with osc2 then it was glowing, what is this?
please tell where i m making mistake??
code is
Code:
void main() {
TRISB = 0; // TO MAKE ALL PORT OUTPUT
PORTB = 0; // TO OFF PORTB
while(1)
{
PORTB = 0xff; // TO TOGGLE 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
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
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...
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.
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.