datasheet says that they are controlled by OPTION_REG , bit 7 (RPBU). (pg. 45)
same page indicates that on reset, this register value defaults to all bits being set, (1111 1111),
so, hook up your switches, dont change nothin' and switch away![]()
datasheet says that they are controlled by OPTION_REG , bit 7 (RPBU). (pg. 45)
same page indicates that on reset, this register value defaults to all bits being set, (1111 1111),
so, hook up your switches, dont change nothin' and switch away![]()
NAG CON WIFE!
WIFE VAR MOOD
Ok, So let's say for some reason the OPTION_REG is getting reset. What syntax do I use in PicBasic Pro to set it again?
I've often found internal pull-ups troublesome and simply use small external resistors between 4.7K and 10K depending on the input device
In that thought process, it appears option_reg.7 = 0 sets all 4 port B pull ups on an 16F88. Can one of those pins then be used as a serial output? I don't see where you can set individual pins.......
On a 16f690, I do this to get the weak pullups working...
It all works weally weakpullup-tastically (but disable any other PIC stuff that maybe sharing those ports...and make sure they're all set as inputs)Code:option_reg.7=0 ' Enable WPUs by individual pin WPUB = %11110000 'enable weak pullups on RB7, RB6, RB5 & RB4
Last edited by HankMcSpank; - 8th October 2010 at 17:06.
Bookmarks