View previous topic :: View next topic |
Author |
Message |
sliders_alpha
Joined: 03 Mar 2008 Posts: 55
|
pull up on some B-pin |
Posted: Tue Apr 28, 2009 2:10 pm |
|
|
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
|
|
Posted: Tue Apr 28, 2009 2:34 pm |
|
|
Try without wired stuff |
|
|
sliders_alpha
Joined: 03 Mar 2008 Posts: 55
|
|
Posted: Tue Apr 28, 2009 2:42 pm |
|
|
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
|
|
Posted: Tue Apr 28, 2009 3:03 pm |
|
|
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
|
|
Posted: Tue Apr 28, 2009 3:46 pm |
|
|
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 |
|
|
|