PDA

View Full Version : I/O dilemma



Kamikaze47
- 6th January 2008, 09:16
I'm working on a project where I would like to hook up 1 LCD and 1 button to an 8-pin 12F683 which only has 6 I/O pins. However, the LCD requires 6 and the button requires 1.

Can anybody think of a solution that would not require any additional components?

Is it possible to use the LCD with only 5 I/O pins perhaps?

Thanks

mat janssen
- 6th January 2008, 10:24
You can sent data to the display with 6 output lines.
Then after sending you make one output pin an input.
look if the input is changing and react on that.
Then if you want to sent som new data to the display make that pin an output again and sent the data to the display.
Edit:
Sorry I saw in the datasheet that this part has only 5 outputs and 1 input what cannot set to an output.
You can take a shiftregister where you sent via the shiftout instruction the 6 lines data to the display. It costs you now only 2 or 3 output lines. How you can do this is already done here in this forum.
Via search you can find it.

Kamikaze47
- 6th January 2008, 10:54
I assume the shift register idea would require additional hardware? This is something I was trying to avoid.

I didn't notice that one of my i/o pins was input only. This means that I have no chance hooking up the LCD unless it can be done with only 5 outputs.

BobK
- 6th January 2008, 16:45
Hi Kamikaze,

Have you given any thought to a serial LCD display? Only needs 1 pin from the micro.

HTH,

BobK