I have a similar problem, using a 4x20 and had a look at the site, but found no code to look at Gordon At 09:30 30/10/97 -0000, you wrote: >Nice one thanks. > >I'm still a little confused as to how to deal with the situation where >the switches are NOT enabled (ie common portion floating) and you are >accessing the LCD when TWO or more switches are pressed. Surely this >will short two data lines together and invalidate the data to/from the >LCD ? > >Please excuse my ignorance on this - it is my first (very ambitious) PIC >project. > > \\\|/// > \\ - - // "Yes it IS safe > ( @ @ ) to switch on" >+---oOOo-(_)-oOOo------------------+ >| Mark Birks | >| Hardware Section Leader | >| OmniBus Systems, Stanford House, | >| Stanford-on-Soar, | >| Loughborough, Leicestershire. UK.| >| | >| Tel/Fax: +44 (0)990 004300/333 | >| E-Mail: markb@omnibus.co.uk | >| ooo0 | >| ( ) 0ooo | >+---\ (----( )------------------+ > \_) ) / > (_/ > > >> ---------- >> From: Jason Wolfson[SMTP:jason@MA.ULTRANET.COM] >> Reply To: pic microcontroller discussion list >> Sent: 29 October 1997 18:42 >> To: PICLIST@MITVMA.MIT.EDU >> Subject: Re: A stupid question but... >> >> Mark, >> I did this with a 20x4 LCD and it worked great, >> check out my code at http://www.ultranet.com/~jason >> >> I put the 4 buttons at each corner of the display and you >> put up a message to their function depending on what you want when... >> Kinda like an ATM machine.... >> >> Jason >> >> >> >> -----Original Message----- >> From: Mark Birks >> To: PICLIST@MITVMA.MIT.EDU >> Date: Wednesday, October 29, 1997 12:04 PM >> Subject: A stupid question but... >> >> >> >Is it possible to multiplex the scanning of 4 push-button switches on >> >the same 4 'data' lines as an LCD module is using ? >> > >> >I've sort of thought along the lines of having all of the switches >> >commoned at one side and then having an OPen -collector arrangement >> to >> >short the switches to ground at read time. >> > >> >The drawback with this arrangement is that when the switches are NOT >> >being read and one or more switches are closed, data lines will be >> >shorted together. Adding diodes seemed like an obvious step forward >> but >> >the 0.7V drop takes them to the top end of the TTL logic '0' level. >> > >> >Anyone got any suggestions please ? >> > >> >Also I am looking at using a standard 16x2 LCD with these switches to >> >allow menu selection and configuration settings - has anyone done >> >anything that allows the PIC to communicate with a host processor (in >> >this case it is ACORN podule bus) to download menu choices, >> selections >> >etc. I am trying to reduce the amount of processing done by the host >> so >> >that the PIC can deal with most of the menu control if poss........ >> > >> > \\\|/// >> > \\ - - // "Yes it IS safe >> > ( @ @ ) to switch on" >> >+---oOOo-(_)-oOOo------------------+ >> >| Mark Birks | >> >| Hardware Section Leader | >> >| OmniBus Systems, Stanford House, | >> >| Stanford-on-Soar, | >> >| Loughborough, Leicestershire. UK.| >> >| | >> >| Tel/Fax: +44 (0)990 004300/333 | >> >| E-Mail: markb@omnibus.co.uk | >> >| ooo0 | >> >| ( ) 0ooo | >> >+---\ (----( )------------------+ >> > \_) ) / >> > (_/ >> > >> > >