I am looking into using an ATmega32U4 for converting a timing sensitive protocol to USB, essentially being a slave to an old traditional bidirectional parallell bus with RD and WR strobes.
I have used 32U4s with Arduino, but in this case I believe I should build the firmware from C for better control (I don't know enough about what the Arduino stuff does that could possibly upset the timing), and I have not done that before. I would be really helped by some advice from this community.
It needs to respond within a microsecond or so to changes in RD and WR strobe lines during transactions on the parallell bus, for example to tristate the outputs when RD goes inactive, and the transactions can last for 10-20 ms or so.
One idea is to use Pin Change Interrupts with the strobes, and do bit banging in those.
But for this to work with microsecond latency, it must respond to the interrupts within a few (16) instructions, so there can be no other interrupts enabled, at least not any with a handler that doesn't immediately enable interrupts again.
Will the USB interface work without interrupts enabled?
Would it be better to use LUFA or the Atmel USB library for this?
Would I be better off with another controller?
Thanks a lot for all input,