> Van: John Esposito > Aan: PICLIST@MITVMA.MIT.EDU > Onderwerp: Remote keypads - which PIC? > Datum: donderdag 13 mei 1999 17:23 > > Hello all. Hello John, > I am trying to implement several remote keypads with one central master, > very similar to a home security system. Each keypad uses a 4x4 matrix > keypad, a 16x2 backlit LCD, 3 diodes, a piezo buzzer, and 2-wire serial > communications with the master. > > I have been gradually incorporating each of these into a PIC16C84, but a > rapidly running out of I/O (only 13) pins even with the use of shift > registers and a software SPI. I eventually want to migrate this to a > cheaper chip, perhaps an 18-pin PIC16C5x or PIC16C62. My first thought was how to combine all those devices. With some restrictions I came to the following, using _all_ pins. One LED could be added though :-) B0-3 A0 LCD in 4-bit mode, Write only. (B0-3 := Data, A0 := Enable) B0-3 A1 Led's (B0-3 := Anode's, A1 := common Kathode) B0-7 Keyboard (B0-3 := Out, B4-7 In -> wake-up on change enabled) A2 Buzzer (taking you use a Piezo, so multiplexing it is not possible) A3-A4 I2C (A3 := Clock, A4 := Data -> OC output & wake-up on change) By using B4-7 as inputs from the Keyboard a Wake-up function (on key-press) could be implemented. Using A4 as I2C-data input serves two functions: One: it's Open-collector (required when using I2C) and a Interrupt-possibility when detecting data-change. Greetz, Rudy Wieser