Connecting a PS / 2 keyboard to the PDA

Using an external full size keyboard when working with a PDA (especially bezklaviaturnym) is a very attractive possibility. For this purpose we can use, for example, LEOSync QuickPAD or Newton Keyboard. But these solutions are too expensive, and carry a keyboard too hard. That's a thought about using a standard keyboard for the IBM PC AT (this stuff everywhere abound). I propose to convert PS / 2 keyboard -> RS232.

Copyright

All rights to the diagram and text of the program belong Olaf Kaluza. All rights to this text belong to Andrei Knyazev (DOOMka). Allowed to use them for personal purposes, for my own pleasure. Undesirable to copy this page and the translation into other languages ​​without permission. Undesirable to copy a CD-ROM or other dissemination of information from this page. If someone's in trouble or break PDA - it's entirely your own problem.

Introduction. The principle of operation. Scheme.

I've been wanting to make such a device. Thoroughly searching the Internet, I came across a page Olaf Kaluza Connection PC AT keyboard to PalmPilot (in Russian, original in German). Here's what you need! However, in the original scheme is an inaccuracy in the numbering of the findings DIN keyboard connector, and I needed to connect a PS / 2 keyboard. So, I changed a little scheme. In addition, to get exactly the items I could not, therefore, in my scheme shows slightly different values. So here's the scheme:
Connecting a PS / 2 keyboard to the PDA
For printing, it is better to use the scheme in PDF. The scheme using a microcontroller ATMEL AT89C2051 (AT89C2051 PDF, AT89 Series PDF) and is extremely simple. To connect the keyboard uses two signal DATA and CLOCK (for details, see Interfacing the PC AT Keyboard). SCAN codes generated by the keyboard are converted to ASCII characters using the program recorded in the microcontroller U1. The inversion of the signal is achieved by transistor Q1. Chain of C3, R3 is used for Power-On Reset (reset / initialization at power). Circuit C1, C2, Y1 - the clock generator of the microcontroller. It is important that the quartz frequency was 24 MHz, because the program is written in a calculation on it! The scheme is not critical to the component values, transistor inverter - ANY low-power NPN transistor (Olaf used BC547). To power the keyboard and the controller must be 5 volts, but it is possible to use lithium-based battery of sufficient capacity. In my design uses a lithium battery with a capacity of 1.2 A / h, located directly on the circuit board.

Manufacturer

Naturally, you need to start with a complete set. I bought a "Chip and Dip" MPU ATMEL AT89C2051-24PI for 67 rubles and a block with 20 pins him for 1.60 rubles. Susekam digging in, I found a transistor, capacitors, resistors, switch and battery. All connectors and quartz at 24MHz, I vypayal of faulty circuit boards. PCB was reluctant to do so installation was on the board to simulate circuits. All farm stuffed into a bar of soap for 8.26 rubles.Here's what happened:
Connecting a PS / 2 keyboard to the PDA
Connecting a PS / 2 keyboard to the PDA
Connecting a PS / 2 keyboard to the PDA
Connecting a PS / 2 keyboard to the PDA
Connecting a PS / 2 keyboard to the PDA
Connecting a PS / 2 keyboard to the PDA
It only remained to program the microcontroller. Programmers are expensive, the cheapest I found was worth $ 95! I made a deal in the company CTC-MK microcontroller programmed for 20 rubles:)! For this purpose it was necessary to come to the office of the firm and to bring chip and software on diskette. For firmware needed to use the BIN file from palmtasta2.zip. Everything!

Jobs

With proper installation of the scheme should work immediately and requires no setup! Input area (cultivated converter keys) inside the highlighted area in the photo.
Connecting a PS / 2 keyboard to the PDA
Not processed Ess, F1-F12 and other special keys (Start, etc.). Signal processing keyboard coming to the RS232 using a program (driver) to connect the Newton keyboard, specific for each type of PDA. For Palm, you can use KeyZ. For this PSION Newton Keyboard driver for PSION device. For Windows CE - NewtonKey. All programs are FREEWARE! No problem, you can enter Russian text in Windows CE HPC and HPC / Pro PDA (for more detailed information, see Keyboard LEOSync QuickPAD).

Conclusion. Conclusions

So, for an amount of about 300 rubles (plus, of course, the cost of the keyboard), we obtained an external full size keyboard worth $ 60-80. Very good! Expand the capabilities of this keyboard can be achieved by improving the code of the microcontroller (not bad to introduce support for Esc, F1-F12 keys, and Start). Take any comments, suggestions and additions. The only request! Do not ask: "Why am I not running the scheme?". Take it AS IS (as it is)! Updates, errors, additions will be posted on the page Keyboard Project. The authors, translation: