Hi All,
Here is a prototype of FIGnition PS/2 keyboard connection. This video demonstrates PS/2 Keyboard connected to FIGnition via Arduino.
http://youtu.be/km-ksxF0fuU
The PS/2 connector is mounted on a prototype shield over Arduino.
FIGnition provides power to Arduino and the keyboard. No computer is
connected. The demo is "Amazing new FIGgy program" by Julian Skidmore.
There are two pieces working together:
1. The Figgipad Encoder, described earlier
2. The PS/2 Keyboard Arduino library with CTRL support, PS2Keyboard 2.3-Ctrl
Supported characters:
- all alpha-numeric
- all syntax chars in Figgipad
(which excludes tilda '~' and underscore '_' mysteriously omitted)
- Enter, Space, Backspace
- Arrow keys
- Special keys:
- Ctlr+A "Again" - repeat last key
- Ctrl+B "Begin" - set marker
- Ctrl+C "Command" - editor commands and octal character entry
- Ctrl+D "Dup" - copy character from marker
- the Esc key, which exists from Figgy editor and can be used to exit
other programs, needs to be pressed once (since Esc is not used to
encode complex keys)
The code of the combined PS/2 and Figgipad Encoder is attached. Note: there is no need for additional memory buffer and the PS/2 library buffer is sufficient to keep up with human typing speed and it is not expected to transfer blocks of data.
Connections:
Figgipad Encoder: Arduino -> FIGnition:
Gnd -> Gnd
D8 -> PB0, D9 -> PD7
D4 -> PC0, D5 -> PC1, D6 -> PC2, D7 -> PC3
PS/2 connections: Arduino -> PS/2:
D3 -> 1 DATA
GND -> 3 GND
+5V -> 4 +5V
D2 -> 5 CLK
Power: Arduino -> FIGnition
5V -> 5V
(Only FIGnition is powered and shares power with Arduno and the keyboard.)
Oleg
2) A minimal I/O chip such as ATTiny. It can provide a really low-cost solution for FIGnition. It probably has to be the largest memory with most pins such as ATtiny4313
3) Replacing the FIGnition keyboard driver
1) An capable add-on board/shield, as discussed here. I think a USB-enabled stamp board like Teensy or Atmega32u4 Breakout would be a good choice because it can:
3) Replacing the FIGnition keyboard driver
That's a separate topic. From what we learnt, it would be tight, but probably possible to fit PS/2 driver in ~700b code. The Arduino library uses interrupts to sense clock signals. This should be reconciled with (timer?) screen refresh interrupts. Since the keypad won't be usable, the space can be used to mount the PS/2 connector.
PS/2 and USB Keyboard
Of course, one way is to compile the V-USB driver for a remote usbasp protocol loader that can program an AVR via its SPI port and load it as normal firmware for FIGnition.
Then the clever bit is that we just build the PS/2 FIGgy shield with links for the e.g. AtTiny2313 SPI port; upload the programmer firmware to the FIGnition; reboot FIGnition (it'll go into remote usbasp mode) then avrdude the AtTiny2313 firmware. Hey presto - the FIGnition is also the programmer!
Reload the normal FIGnition firmware and whoopie, you've done it! Cost £0.00 and it means FIGnition can also be promoted as a programmer!
Hi these are the observations that I made building the Keyboard interface, I have also blogged this and liked it back to here, thanks Again Fig8r!
: <H1> ." <H1>" ; : </H1> ." </H1>" ;
<H1> ." Hello, world!" </H1>