I've lost some time debugging a firmware until I realized that I was taking the B1,B2,B3,B4 pins on the board by PB1 PB2 PB3 PB4 on the single face board. Then to avoid future mistakes such that I've drew the pinout diagram for this board.
I've just built and tested the conventional components, single faced printed circuit board for AVeRCADE. As I've imagined there were some small short circuits due to the proximity of some tracks but easily detectable with a multimeter. When checking with the magnifier glass I've realized that the board should have stayed longer in the etching bath because most of the short circuits were caused by very thin copper connections that remained from the corrosion.
Here are the 1-inch board side by side with the Single faced board. It has roughly the size of an Arduino.
The same firmware can run on both boards. After all they share exactly the same circuit.
I've just etched the single face PCB. The results were good but I am thinking about changing the width of some tracks to reduce the probability of a short circuit.
The component pads have been enlarged to ease the home built versions of the board.
Just added another PCB layout with conventional components (through-hole) and single sided for ease of diy board manufacturing. The board measures 1.8 x 2.6 inches (roughly 40 x 70 mm) and has connections for VCC and RESET pins. The remaining pins were kept at the same configuration as the original board which means 2 rows of pins, A1-A9 and B1-B9.
The Eagle files are on github under "circuit" folder.
Here are some news on the AVeRCADE project:
Things yet to be done
The connections to ISP and LEDs can be seen below. The jumper is optional since AVRDude allows to use the -B option to perform programming at low speed.
The prototype can be seen below.
I have a new firmware on sight for Avercade. It is a composite device for reading a ZX Spectrum (or ZX81 ) keyboard matrix and converting them to keystrokes.
The ZX matrix takes only 13 lines, leaving 6 more lines for reading an Atari compatible joystick.
I plan to reuse code from C64 Key project for the keyboard part.
I've rewritten the support for paddle controllers in Dual Atari configuration. Now the paddle position is sensed by the charging time of a capacitor.
The code was tested on the new board I have assembled using a ATMega88PA. Since it was a development version I did only the wires for one controller, tough it is enough to test a pair of paddles. The analog valeus are read as RX and RY axes, one for each paddle controller.
The new code was uploaded to GitHub
I have bought recently some newer ATMega88PA which version 5.1 of AVRDUDE didn't recognized.
Searching online for a solution I came to two ways of use the Mega88PA:
1) copy the entire mega88 section inside avrdude.conf file
2) use a newer version of AVRDUDE (avrdude-6.2-mingw32.zip)
Either solution will work, but both WINAVR and ATMEL AVR TOOLCHAIN that I have installed in my PC have put avrdude path in windows PATH environment variable. So before update AVRDUDE or edit the avrdude.conf file it is necessary to check in windows path if you are dealing with the correct files. The best is to leave only one AVRDUDE.exe (and AVRDUDE.CONF) and rename or remove any other instance of such files.
For the bootloader, just edit the makefile for atmega88 (without the P) and after compiling type the following command to upload the bootloader. If you're using USBASP insert the "low speed" jumper.
>avrdude -cusbasp -pm88p -U flash:w:main.hex:i
Then type the command below to program the fuses.
>avrdude -cusbasp -pm88p -U hfuse:w:0xd6:m -U lfuse:w:0xdf:m -U efuse:w:0xf8:m
Connections for Digital Joystick - 14 buttons
Connections for Dual Digital Joystick - 5 buttons
Connections for Six Axis - 12 buttons. Each potentiometer is 100K