[SOLVED] problem in blinking led

Status
Not open for further replies.

hassan khan

Junior Member level 1
Joined
Mar 25, 2012
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,370
hi!
i am newbie i m using "US-Burn V1.8 a3" programmer and mikroc as compiler
My code is:

void main() {
TRISB = 0; // TO MAKE PORTB OUTPUT
PORTB = 0;
while(1)
{
PORTB = ~PORTB; // TO TOGGLE PORTB
Delay_ms(5000);
}
}

but when i m checking it on hardware led is just ON but it is not blinking,when i m burning the code from programmar during blank check it was giving me an error "config error don't care".tell me whats the mistake i m doing

your response will be highly appreciated!!!
 

Which microcontroller are you using? What configuration settings did you use? To view the configuration settings in mikroC, press Ctrl + Shift + E.



i m uploading a picture that can tell the config, controller is 16f877a

- - - Updated - - -

http://obrazki.elektroda.pl/3425565000_1362315979.html
 

i m still facing problem, now when i powered after doing XT,it blinked & OFF & no further response.what is it??
 

Did you erase the PIC contents before you performed the blank check?

There are many PIC programmers that don't "read" the configuration settings from the code and require setting the configuration bits manually. The screenshot shows that the programmer software has a tab "PIC-Configuration". Perhaps your programmer requires manual configuration of the configuration bits that are to be done after selecting that tab. Post a screenshot of that tab.
 

No, that's fine. In mikroC, you don't need to add header files like you do for many other compilers. All required files are added and settings are set properly. Try setting the configuration bits in the programmer like I mentioned in post #10 (https://www.edaboard.com/threads/281885/#post1206070) above.

Post your circuit diagram / schematic as well.

Hope this helps.
Tahmid.
 

i programmed 16f84a for servo motor & it was working but i dont know whats the problem now, actually i m just a newbie i enjoy downloading some code from the net & try to alter it but actually i was studying timers interrupt etc then when i came to implement it, it wasn't doing job for me so i asked you people to help me.
can u ppl tell me now if the programmer is not doing job accurately so how can i check it?
another question i have, am using win7 64-bit,could it be the problem??
 

Win 7 64 bit runs both 32 bit and 64 bit programs, So, running your programming software is not a problem.

In your code instead of toggling PORTB try to toggle PORTC and PORTD. See if that works. If that works then it means your PORTB is damaged.
 
Last edited:

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…