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

pull up on some B-pin

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



Joined: 03 Mar 2008
Posts: 55

View user's profile Send private message

pull up on some B-pin
PostPosted: Tue Apr 28, 2009 2:10 pm     Reply with quote

hi,

I want pull up on B0 and B5 on a 16F876A under CCSV4.057.

Should I do this : port_b_pullups (0b00100001);

I have a lot of stuff wired on port b, just checking, I don't want to destroy a pin.

Thanks
_________________
yup, i know, i don't speak english very well

CCS V4.057
bungee-



Joined: 27 Jun 2007
Posts: 206

View user's profile Send private message

PostPosted: Tue Apr 28, 2009 2:34 pm     Reply with quote

Try without wired stuff Wink
sliders_alpha



Joined: 03 Mar 2008
Posts: 55

View user's profile Send private message

PostPosted: Tue Apr 28, 2009 2:42 pm     Reply with quote

it's an smd board, everything is soldered and i forgot to put two pull up :/
_________________
yup, i know, i don't speak english very well

CCS V4.057
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Apr 28, 2009 3:03 pm     Reply with quote

Quote:
Should I do this : port_b_pullups (0b00100001);

Read the PIC data sheet. Secton 4.2 says:
Quote:
Each of the PORTB pins has a weak internal pull-up.
A single control bit can turn on all the pull-ups.

There is no individual control of bits.


Quote:
I don't want to destroy a pin.

Read the PIC data sheet. Section 17.2 says:
Quote:
PORTB Weak Pull-up Current: Min:50 µA Typ:250 µA Max:400 µA

This gives a typical pull-up of 20K ohms.

Also, internal pull-ups only work when the pin is set to be an input pin.
Secton 4.2 of the data sheet says:
Quote:
The weak pull-up is automatically turned off when the port
pin is configured as an output.
sliders_alpha



Joined: 03 Mar 2008
Posts: 55

View user's profile Send private message

PostPosted: Tue Apr 28, 2009 3:46 pm     Reply with quote

alright, thanks a lot, i'm going to put "real" pull up then
_________________
yup, i know, i don't speak english very well

CCS V4.057
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