-
New Firmware: USBasp
02/06/2016 at 02:33 • 0 commentsI have modified USBasp code to run on AVeRCADE. Basically I have did 3 things:
- Changed the USB pin definition to port D and enhanced the initialization code using USB connect / disconnect functions
- Changed the clock speed definitions to run at 16MHz
- Changed the LedOn / LedOff commands to drive the LEDs by the anode instead of cathode
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.
-
New firmware on sight: ZX Spectrum Keyboard
01/27/2016 at 23:11 • 0 commentsI 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.
-
Dual Atari: Paddle suppor rewritten
12/21/2015 at 03:18 • 0 commentsI'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
-
Dealing with ATMega88PA
12/20/2015 at 00:38 • 0 commentsI 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
-
Second firmware video: Dual digital
12/04/2015 at 02:04 • 0 commentsThe video below shows #AVeRCADE working in Dual Analog mode. When the video was shoot the analog axes have been already calibrated. The calibration is necessary because the only supply for the potentiomenter is the internal 50K pullup resistor from AVR port.
-
Checking the firmwares
11/30/2015 at 04:35 • 0 commentsAVeRCADE in action, digital configuration (directional plus 14 buttons).
-
Added GitHub repository
11/21/2015 at 11:38 • 0 commentsCreated a GitHub repository for the project (link)
-
Paddles Ready
11/13/2015 at 11:04 • 0 commentsThe paddles are now ready for testing the Dual Atari firmware for AVeRCADE.
more details about the paddles here: #Atari 2600 Paddle Controller Reloaded
-
AVR Startup Timer issue
11/10/2015 at 01:02 • 0 commentsWhen I moved from prototype to final circuit I decided to add a 100nF capacitor at RESET line of the AVR to enhance noise immunity on this line, but unfortunately a side effect have appeared: With the capacitor the firmware always executed the bootloader.
The first analysis pointed to the hypothesis that capacitor stretches the time the reset line is held low beyond the time the AVR takes to start to execute code and then the flag EXTRF is set thus triggering the bootloader to run.
The datasheet suggests that the time MAX treshold for the RESET pin is 0.9Vcc which means 4.5Volts when the AVR is USB powered.
The measurements taken on RESET pin endorsed this hypothesis. For a pullup resistor of 47K and a 100nF capacitor this time was close to 10ms.
The used SUT (Start Up Timer) configuration was 16K ck + 0ms, which also endoresed the hypothesis (16K cycles at 16MHz means roughly 1ms).
The initial solution was to program the fuses for 16K ck + 64ms, which should be far beyond the time needed to reach the upper treshold voltage for RESET pin.
Buuuuuut... it doesn't worked. The AVR insists on entering the bootloader right after power up. So the solution for now is to take out the capacitor.
By the way, the waveform on RESET pin without the boot capacitor is very interesting : A small peak, then a 1V plateau that takes about 250us, then the voltage rises abruptally and then start to rise relatively slow until it reaches Vcc.
-
Assembled, programmed and working!
11/08/2015 at 01:02 • 7 commentsThe board is now ready to go! Time to work on documentation!