- TI83+ Series Compatible Gamepad
- 12 Jul 2012 02:33:10 am
There is a small microcontroller inside which converts signals sent from the calculator into control signals for a data selector (multiplexer). This selects which button to read. The output of this is fed back into the calculator. The calculator needs to run some code to be able to read the keystrokes. This code is easy to implement into existing games (hint hint)
The calculator runs code to pull down the one line of the I/O port (1->port) then the AtTiny45 MCU @1MHz inside the gamepad increases the value of a counter. The binairy value is then used to control a multiplexer via a 3 bits wide control bus. All of the buttons are hooked up to the multiplexer. The output of the multiplexer is fed back into the calculator's I/O port. After a short delay the calculator reads the port value. This corresponds with a keypress or not.
At the moment there are some mechanical issues with the gamepad (bad contacts and bad solder connections). Also: it is very time consuming to fit everything inside the gamepad. I had to mod the plastic casing a bit to make everything fit. I might want to make converter boxes/adapters instead.
Code to read keystrokes:
After a delay of PAUSE 16 the microcontroller times out and resets the counter. In further revisions this delay can be decreased if necessary.