On Apr 7, 2012, at 10:10, S?ren Gust<sgust at
ithh.informationstheater.de> wrote:
On Fri, Apr 06, 2012 at 04:41:47PM -0300,
Alexandre Souza - Listas wrote:
I still believe I can do that with a fast
microcontroller. As
soon as I can put my dirty hands into one I'll jack it up to the
logic analyser and play with that.
I tried that about 2 years ago using an
ATmega644. It nearly worked, but
when the C64 switched from one keyboard row to the next the ATmega644
generated several pin change interrupts. This took too long to process
and the C64 got the wrong answer. Maybe one day I will look into faster
processors but the ones I know about are quite slow at I/O. The timing
of the NMI routine (for checking RUN/STOP when RESTORE is pressed) is
even tighter than the normal IRQ.
You may have better luck with the XMEGA AVR
series (I'm using an ATXMEGA32A4 in a current project). They've restructured the
I/O and interrupts and added DMA and a curious "event" system which can take a
lot of the work off the processor. Definitely worth considering.
Failing that, you can get low-power ARM Cortex-M3s for about the same price now.
- Dave
I'd be interested in any successes, as I was unsuccessful as well. I
could try again with the mbed (cortex m3), but I am not hopeful. The
worst case scenario is a KB event simultaneous with a joystick event.
Filtering out the joystick events was my big issue:
* seeing a low event happen on what would normally be the input pins,
and trying to decide if that was caused by the joystick or a custom
scan routine that uses the input lines as the output lines
* Having the joystick or the POT selection lines be accessed while in
the middle of servicing a IRQ for the KB lines.
I found DIP 8x16 analog crosspoint switches
(
) for a more reasonable
price (still high than I'd prefer), if anyone is interested.
Jim
--
Jim Brain
brain at