I am sharing LCD I/O pins with inputs from key switches on an SX=20 chip. The keys can only pull down an input through diodes when=20 it's common connection is set low by an output (key enable) and=20 the internal clamping resistors are used to pull the line high=20 when the switch is open. One problem I had with this was that it sems that the LCD I/O=20 pins has a pretty high capacitance. If I read the keys right=20 after I had written a zero to the LCD input and the key switch=20 on the same line is open, the clamping resistors was sometimes=20 too weak to pull the (now input) line high quick enough. This=20 resulted in that the switch would sometimes be read as closed=20 even though it was open. The solution was simple though - write=20 a one to the I/O line for a short time, just before the keys are=20 read. It took a while to debug since LCD updates (writes) is not=20 synchronized with key switch reads. Ruben > I think about sharing PORTB RB4:7 for hd44780 lcd, 4 DAC's > data/clk, not enable and not load pin. >=20 > I think it should fine. But if it is normally people doing and any > disadvantages? >=20 > BR, >=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Ruben J=F6nsson AB Liros Elektronik Box 9124, 200 39 Malm=F6, Sweden TEL INT +46 40142078 FAX INT +46 40947388 ruben@pp.sbbs.se =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body