
Originally Posted by
dougsego
I'm attempting to configure portb.0 and portb.1 on a 16F883 as inputs with weak pull-ups. The register set-up code I'm using is:
ANSELH=%00000000 'portb are all digital
trisb=%00000011 ' portb.0 and portb.1 are inputs
option_reg=%10010111 'Global Pull-up disabled and internal clk
WPUB=%00000011 'Weak pull-up portb.0 and portb.1
portb=%00000011 ' Outputs off, inputs don't care
However, when I measure these nodes with a DVM (input impedance ~ or > 500K), I get 0v instead of the 5v I'm expecting.
Any ideas?
Thanks
Hi Dougsego,
Global pull up cleared means bit 7 should be set to zero: option_reg=%00010111 , see page 77 of the Data sheet:
" 0 = PortB pullups are enabled by individual port LATCH values " .
Last edited by Archangel; - 11th September 2007 at 06:48.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks