gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Hardware > Cart Interrupt Pin Limits?

#20491 - Interrupt - Wed May 12, 2004 4:29 am

I'm trying to read data from an A/D Converter sampling at 10 kHz using an XPort 2.0 from www.charmedlabs.com.

I'm wondering if there is a limit to how fast I can use the Cart Interrupt Pin to trigger interrupts on the GBA.

Unless I've got a problem with my Verilog code, it appears that I cannot trigger interrupts at 10 kHz like I wanted (I'm trying to keep things simple). If I change my Verilog code to trigger interrupts at 1 Hz, the GBA recognizes them. Maybe it's overkill to trigger at 10 kHz? The GBA runs at 16 MHz though, if I'm not mistaken.

I suppose, if I have to, I could store 100, or so, samples and only trigger at 100 Hz; however, that means I'd have to write more Verilog code, which I'd like to avoid :) Anyways, if you have any experience with this let me know.

Thanks,
Interrupt

#20492 - tepples - Wed May 12, 2004 4:39 am

I don't use an Xport, but here's how I'd fire IRQs using the GBA's built-in IRQ generation hardware:

  • Hblank fires at 16777216/1232 = 13617.87 Hz.
  • A timer set to 1678 cycles/tick fires at 16777216/1678 = 9998.34 Hz.
  • Or you could ring-buffer 32 or so samples at a time and then bring them onto the GBA at specified vcounts.

_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.