Hi Edson- Yes, that's doable. However, you can also use negative logic, if you reverse the diodes. David Edson Brusque wrote: > Hello Wouter, > > > - you have a pin 'left over' (or two, when you don't read). Use them all > to > > drive E in and-fashion (you can use a D-R and gate, I think that does not > > count as active?) > > This gave me an idea, just wait... I need to elaborate it: > > Well, here we go. Sorry for attaching a 33KB bitmap on this email, but > it's small. :) > > When you're scanning the keyboard, RB3:RB0 are outputs and RB7:RB4 are > inputs. You'll need the external pull-downs (about 10K). As we'll see below, > the internal pull-ups wouldn't work. > > Just do the keyboard scanning as usual positive-logic. When you have a > key pressed, the corresponding input pin will go high when you put the > corresponding output pin high. > > As you can see, the LCD will ignore these signals, because you need to > have RB1 AND RB2 HIGH for it to see a HIGH on the enable line. > > I think R1-R8 can be 1K and R9 10K. The diodes can be 1N4148. This will > make the LCD-ENA line LOW when RB1 OR RB2 are LOW. This is the normal > keyboard scanning situation, where you turn RB0=HI, read ROW1 on RB7:RB4, > turn RB0=LO RB1=HI, read ROW2 on RB7:RB4 and so on. You never will have both > RB1 and RB2 HIGH when scanning the keyboard. > > You can use negative logic for the keys if you invert the LCD-ENA signal > with a transistor, but then it's not a only passive circuit anymore. > > Have I won the award? So I want divide the price with Wouter. ;^) > > Best regards, > > Brusque > > ----------------------------------- > Edson Brusque > Research and Development > C.I.Tronics Lighting Designers Ltda > Blumenau - SC - Brazil > www.citronics.com.br > Say NO to HTML mail > ----------------------------------- > > ------------------------------------------------------------------------ > Name: keyb2.bmp > keyb2.bmp Type: Pbrush File (image/bmp) > Encoding: base64 -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics