'LCD and Keypad at the same Port'
Hello All !
Is it possible to connect an LCD (in 4bit mode) and an Keypad (4x4) at the
same Port of an PIC. If yes, how has the Hardware to be ??
Thanks a lot for answers :-)
\ olle / usa.netschaedle
\/\/olfgang DB6TE @ DB0CZ
Yes and no... To drive the LCD you need to use a pin for enable. You
can't use that pin for scanning the keypad. So... Here's what I've
LCD --> PIC --> Keypad
DB7 RB3 Row4
DB6 RB2 Row3
DB5 RB1 Row2
DB4 RB0 Row1
R/W RB4 Col1
RS RB5 Col2
As you can see I used one port and one additional pin for E... The
software initializes PortB all high and all outputs. When driving the
LCD display make sure to keep RB6 and RB7 high! For scanning the
keyboard I make RB0 to RB3 inputs and pull RB4 to RB7 low one after
the other to scan the keyboard. Oh ja, you need pull-ups on RB0 to
RB3 (either external or enable internal if 16F84) and you need diodes
in the lines connecting the keys to RB0 to RB3 to prevent
interference between the LCD and keys...
Hope this helps...
> Hello All !
> Is it possible to connect an LCD (in 4bit mode) and an Keypad (4x4) at the
> same Port of an PIC. If yes, how has the Hardware to be ??
> Thanks a lot for answers :-)
> \ olle / usa.netschaedle
> \/\/olfgang DB6TE @ DB0CZ
EVERYDAY PRATICAL ELECTRONICS MAGAZINE NOVEMBER/1997 PAGE 782
has a schematic using the LCD DATA BUS to connect as a KEYBOARD!
More... (looser matching)
- Last day of these posts
- In 1998
, 1999 only
- New search...