From: Daniel O'Shea (dan_at_ozramp.net.au)
Date: 2007-04-11 06:32:18
thanks Jim & Levente, the ATmega8L looks like a good choice! Jim Brain wrote: > For the PWM code to work, you need 2 outputs for the POT lines, plus 1 > IRQ (can;t be on of the outputs) 3 pins > 5 JOY buttons = 5 pins I'm a little hazy as to how the IRQ works, I'd still want to have the standard DE9 pinout as the interface to the C64: 1. Up 2. Down 3. Left 4. Right 5. Pot Y 6. Fire Button 7. +5V 8. GND 9. Pot X ...does the IRQ first read from the Pot lines, and then write to them? > If space isn't a premium, I vote for the ATMEGA8, a 28 pin IC that has > plenty of program space and IO for what you plan to do. It's $3.66 in > singles. You can add some more goodies to the code later, if you wish. Yes, I already have some goodies in mind for later... like maybe adjusting the PWM for an Atari or VIC20, or maybe sending out button presses as a NES/SNES compatible serial signal! (PS. Jim, http://www.jbrain.com/ gives me an Error 403 - Forbidden?) Hársfalvi Levente wrote: > As of deciding which mode of operation should be the current one for > the interface (C64 vs. PXA270): instead of jumpers, you can probably > measure the supply voltage of the MCU right in the reset routine. All > those Atmels have a built-in voltage reference... measuring the supply > voltage by an ADC channel is fully possible. In the reset routine, > your code could decide if the unit is powered from 3.3 or 5v, and set > things up accordingly. Yes, very good point - I had thought of that, but was worried about accidentally sending 3.3V in to the C64! But I suppose it should be safe if nothing is sent out until this check is done - would also be handy to have the setup routine turn off the microcontroller's ADC Pot inputs in 3.3V mode, as they won't be needed... Message was sent through the cbm-hackers mailing list
Archive generated by hypermail pre-2.1.8.