![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
vladtess
Joined: 14 May 2011 Posts: 26
|
Problem with PortB0 |
Posted: Tue Sep 13, 2011 6:02 pm |
|
|
Hi there. I'll get right to the meat:
Code: |
#include <16F877A.h>
#INCLUDE <stdlib.h>
#include "LCD.h"
#fuses hs, nowdt, noput, nobrownout, nolvp, nocpd, nowrt, nodebug, noprotect
#use delay(clock=20000000)
//==========================
void main(void)
{
for(;;){
output_b(0xff);
}
}
|
Now the whole B port should be high. Now the problem is that all pins are high (show 4.89Volts) except B0, which shows .56 volts. Anyone know why this may be. I've tried also to use other functions such as output_high(). This caused me a lot of trouble while working with an HD LCD series.
Why could this be? Thanks!!! |
|
![](templates/subSilver/images/spacer.gif) |
mbradley
Joined: 11 Jul 2009 Posts: 118 Location: California, USA
|
|
Posted: Tue Sep 13, 2011 9:58 pm |
|
|
Just curious, without the lcd.h, same result? _________________ Michael Bradley
www.mculabs.com
Open Drivers and Projects |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19368
|
|
Posted: Wed Sep 14, 2011 1:57 am |
|
|
The obvious thing would be a short on the board. If you are using a PDIP chip, try the simple expedient of bending the leg out so B0 is not connected, test the code again, and see if B0 now goes high. If not, a magnifying glass, and looking for what is connected to B0, and for things like whisker shorts on the board. There is nothing electircally 'special' about B0 (no other peripherals on the pin on this chip version), so it really comes down to a short, or a damaged pin on the chip.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|