Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Portb

Status
Not open for further replies.

YAN-1

New Member
Hello everyone. I am going nuts! I have a simple program to run but for some reason, all my PICs (16F877A) are not outputting ANYTHING on RB6 or RB7. Those pins seem to be floating all the time although they are configured as outputs just like the rest of PORTB. It can't be that all my PICs have malfunctioning RB6 and RB7 pins, can it?! Thanks a lot.
 
Try posting your code here! - make sure you use the code tags to maintain it's formatting.

BTW - those pins are used for programming and de-bugging, do you have de-bugging turned ON?.
 
Last edited:
Looking at the datasheet, I suspect that you have it set to in-circuit debug mode which grabs RB6 & 7 and stops them being used as normal ports.

Check the configuration word - bit 11 must be set to 1 to disable debug mode.
 
Hello. Sorry for the late reply.

Well it's a really simple code. I've reduced it now to just blinking PORTB but those 2 bits just refuse to go high. I've never turned the debugging on. I use PIC StartPlus to program and so i manually set the configuration bits from the configuration menu in MPLAB, and it has always worked. What could be the problem now? Thanks a lot.
 
Check bit 11 of the configuration word, as suggested. It must be set.
To disable the debugger you can add the _DEBUG_OFF label to the __CONFIG directive.
 
Thanks guys. It worked. Turns out that bit 11 of the configuration word is not covered by the configuration menu in MPLAB. So I set the configuration word in the code and it worked. Solved some other problems as well! The weird thing is that I have ALWAYS used the configuration menu of MPLAB when programming and it never gave me any problems until yesterday. Ah well! Thanks again.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top