It's working!!! I was bound and determined to figure out the occasional glitches with the interrupt-driven MIDI input. I'm used to assembly language stack-based machines. I was using the same variables in the interrupt service routine so I had problems with stepping on the variables in the main code during an interrupt. I had to change to local variables where possible in the interrupt service routine and disable interrupts in the main code when checking or manipulating these variables. This also corrects the issue I was having with byte variables. For some reason setting the variables to words greatly reduced the frequency of collision. I merged the polled and interrupt modes with a compile option. You can compile for either polled MIDI input or interrupt MIDI input. The MIDI output is always polled. I'll upload the code later tonight. Dave
Message
MIDI input and output code working!
2004-04-13 by djbrow54
Attachments
- No local attachments were found for this message.