> Van: Athanasios Gogos > Aan: PICLIST@MITVMA.MIT.EDU > Onderwerp: HELPIC > Datum: dinsdag 9 februari 1999 2:48 > > Hello, Hello Athanasios, > I want to interface on a master PIC a 4-digit LCD display and > a 4x4 keypad and this node to communicate with two slave > nodes(interfaced only with a 4 digit LCD) with a two wire I2C bus. > The problem I came up with is By using the PIC16C5X family do not hane > enough I/O lines to do that, and also I want to keep the external hardware > to a minimum. > Any sugestions on to which PIC should I use and if I have to use > external circuitry how that can be done? > Thank you in advance Use the LCD-module in 4-bit mode (using 4 data & 3 control) connected to PortB. Double-use the 4 outputs to the LCD-Module as outputs to your 4x4 Keypad. Use PortA.0 to 3 as inputs from your KeyPad (Pull-up's required). Use PortA.4 as I2C Output (don't forget the Pull-up resistor !) and the non-used line on port B as I2C Clock. Greetz, Rudy Wieser P.s. Take care that the 4x4 KeyPad does not short-circuit the PIC-outputs when multiple buttons are pressed ... (use Diodes in series with buttons or driving lines)