Justin. The idea is sound but I would probably use rather higher values (10= x ?) for both resistors.=20 -- Bob Ammerman RAm Systems =20 -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of Justin Richards Sent: Monday, May 13, 2013 1:12 PM To: Microcontroller discussion list - Public. Subject: Re: [PIC]: 16F887 using port A for both input and output I should perhaps mention that I want to use the same 4 pins for both input and output incase that was not clear. On 14 May 2013 00:58, Justin Richards wrote: > Just wanted to run this past the wisdom of the list. > > Port Pins RA4 - RA7 on a 16F887 are successfully driving a standard 2=20 > x 16 LCD (via a shift register). > > Want to add 4 push buttons (ENTER, EXIT, UP,DOWN). > > Possible solution > > use weak pull downs approx 4.7K from port pin to ground. > > use 680ohm from port pin to N/O push button then to +V. > > PIC should still be able to drive pins high or low as needed to=20 > control LCD even when switch is pressed. Quick test seems to indicate this is ok. > > Current when PIN driven low and switch is pressed, I =3D V/R =3D 5/680 ~ = 7=20 > mA (+ LCD and shift reg loading) > > Is this plausible. > > Cheers Justin > > > > > > -- http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/chang= e your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .