CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Problem with PortB0

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
vladtess



Joined: 14 May 2011
Posts: 26

View user's profile Send private message

Problem with PortB0
PostPosted: Tue Sep 13, 2011 6:02 pm     Reply with quote

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!!!
mbradley



Joined: 11 Jul 2009
Posts: 118
Location: California, USA

View user's profile Send private message Visit poster's website

PostPosted: Tue Sep 13, 2011 9:58 pm     Reply with quote

Just curious, without the lcd.h, same result?
_________________
Michael Bradley
www.mculabs.com
Open Drivers and Projects
Ttelmah



Joined: 11 Mar 2010
Posts: 19506

View user's profile Send private message

PostPosted: Wed Sep 14, 2011 1:57 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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