Saturday, April 24, 2010
A menu system was added too (as well as an annoying bug...).
I noticed that the button response is getting worse with time and the number of button clicks. Perhaps they are just to cheap? It is not a software fault.
The possibility to calibrate the clock for higher accuracy is still missing.
Finally! My gameport project is finished!
With this little circuit it is possible to emulate a ps/2 keyboard with your gamepad.
I designed the circuit for a game that could not be played with that gamepad. But it worked well with a keyboard - so this evil mad idea was born. ;)
I used my old repaired gravis gamepad (repair report) for that project. Other gamepads could be wired internal in a different way.
The circuit is designed for digital gamepads only - no analog sticks or joysticks are supported (yet)!
But such a functionality could be implemented too. Because i used an old ATMEGA8, there are a lot of free pins for further experiments and hacks.
The buttons are "hard wired" in the code to keys. I used the ALT, SPACE, ENTER and CNTRL keys for the buttons. A function to define new key bindings without hacking them into the code and reporogram the controller could be implemented - but i was to lazy to write it. ^.^
Another impressive project that shows how easy and yet powerfull a µC circuit can be.
The circuit in the red box does all the magic.
Feel free to use or improve this circuit.
The code can be found here:
http://sites.google.com/site/species0x2118/hive/gamepad.c?attredirects=0&d=1 (direct link)
I changed the fuses to run the controller with 8 MHz to have enough speed reserves. But a lower frequency could work as well.
As a goody i made a video of the gameplay with the gamepad connected to the converter:
Wednesday, April 21, 2010
Last week i repaired my old Gravis gamepad. It had a broken cable. To fix it, i bought a joystick extension cable as replacement. Because the new cable was a bit thicker, i had to modify the casing of the gamepad. The modifications are not visible from the outside.
Monday, April 5, 2010
Here is the code:
#includeYou need the UART library from Peter Fleury (http://jump.to/fleury).
#define F_CPU 11059200
#define UART_BAUD_RATE 115200
uart_init( UART_BAUD_SELECT(UART_BAUD_RATE,F_CPU) );
uart_puts("Starting low cost logic analyzer.\n");
uart_putc( PINB + '0' );
uart_putc( '\r' );
Unfortunatly i have no software for the data analysis. I saved the data with HTERM as text file so far.
Next project was the modification of my good old LEGO Technic truck.
He needs a huge amount of AA batteries - more than i had. But i wanted to make it work
And it worked. With my old self made power supply it was a joy to play with the truck. ; )
And finally if finished the case for my thermometer. I found some transparent plasic in the cellar. Now only a calibration function for the clock is left.