PDA

View Full Version : I can't beleive this works! :D


Art
- 8th August 2003, 19:39
Hi Guys,
If you connect an LCD as described in the manual, there are exactly seven port pins left on a 16F84/628. A 3x4 matrix
keypad generaly requires seven pins, but I was able to flog the
LCD data port for the keypad scan outputs since no program
will ever scan the keypad and write to the LCD at exactly the same time.. and now there's four spare pins for speakers, switches, etc.

At the moment, the only hardware bug is holding down three or
more keys will cause jargon on the display, so I will stay away from keypad combinations for activating menu functions.

Now I'm thinking it would be better to use the 4 bit LCD data port
as inputs for the keypad scan routine, and switch back to output
for the PBP LCD libraries.
Cheers, Art.

Darrel Taylor
- 10th August 2003, 10:57
Art,

If you need a couple more pins, you could use the internal oscillator of the 16F628.

Then if you move the LCD Enable line from RB3 to RA6, you can use the CCP module (HPWM) to control the brightness of the LCD backlight.

Just an thought.