Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Keyboard Interface to LCD .

Status
Not open for further replies.

George Francis

New Member
I want to connect an AT keyboard to a LCD interface. Serial input from kybd (ASCII alpha numerical) 1start8N1stop format. Any help or suggestions , circuit, etc. will be most appreciated. Regards, George
 
George Francis said:
I want to connect an AT keyboard to a LCD interface. Serial input from kybd (ASCII alpha numerical) 1start8N1stop format. Any help or suggestions , circuit, etc. will be most appreciated. Regards, George

You need a processor in between them, a PIC would be fine - I'm presuming you mean the standard text LCD modules?, that's simple to do with a PIC.

The UK magazine EPE did a project on keyboards and mice a while back, the PIC source code can be downloaded from their website.
 
not necessairily.

I think you can get away with it with only two 8-bit shift registers, or if you are lucky to find it, 1 16-bit shift register.

Hook the data line to the shift register's serial input. Hook the clock line to the clock of both shift registers (or if the clock is activated the oher way, hook the clock line to an inverter, and then the other end of the inverter goes to the shift register clocks)

Hook the VCC lines and Ground lines to 5V and ground respectively.

Now when you press a key, the bits are sent. Let's assume you have a +ve start bit, and a stop bit. As soon as bit 10 (register 2, 2nd bit) is on, take the data from bits 2 to 9. Ignore what is at 1. At this point of time, the 8 bits will be sent to the LCD and one LCD clock cycle will occur. As soon as that is done, a reset to the registers occurs.

good luck.
 
mstechca said:
Now when you press a key, the bits are sent. Let's assume you have a +ve start bit, and a stop bit. As soon as bit 10 (register 2, 2nd bit) is on, take the data from bits 2 to 9. Ignore what is at 1. At this point of time, the 8 bits will be sent to the LCD and one LCD clock cycle will occur. As soon as that is done, a reset to the registers occurs.

Nice idea!, but how do you set the LCD up?, and how do you switch between control and text modes?.
 
You need an 8-bit comparator. It takes 2 8-bit inputs and produces a true output if both inputs are equal.

One 8-bit input goes to the incoming data, and the other 8-bit input is fixed to whatever value you want.

As soon as the output is true, the flip-flop is turned on, indicating that you are in mode B. Once the same character is sent again, the flip flop is turned off (mode A).
 
mstechca said:
You need an 8-bit comparator. It takes 2 8-bit inputs and produces a true output if both inputs are equal.

One 8-bit input goes to the incoming data, and the other 8-bit input is fixed to whatever value you want.

As soon as the output is true, the flip-flop is turned on, indicating that you are in mode B. Once the same character is sent again, the flip flop is turned off (mode A).

You don't think it's perhaps a little complicated?, compared to a single 18 pin PIC?. You then have the problems of converting from the keycodes the keyboard supplies to suitable codes for the display, plus handling shift and control keys - perhaps a couple of preprogrammed EPROM's as a lookup table?, and a few more latches?.
 
Looks like Nigel and myself have presented you with a choice. You can either program a microcontroller and have it do the job, or go hardcoded style, like what I said above.

The advantage to Nigels method is that the final product can be smaller and I think simpler. BUT the disadvantage is that data could be lost if mistreated, AND the data must be programmed in it.

The advantage to my method is that there is NO programming, and speed is not dependent on another clock. It is only dependent on the keyboard clock which is always optimal speed. The disadvantage with my method is the fact that you need more chips to do the same function.

So the choice is yours.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top