Anyone interested in helping with interrupt MIDI output?
2005-04-29 by djbrow54
My PSIM template code runs with timer interrupts and MIDI input interrupts. I've been trying to get MIDI outputs to run with interrupts instead of polling. After a couple of days of working with the AtomPro I've come to the conclusion that the oninterrupt command is not working for transmit buffer empty. I've gotten all the buffer code working and I'm streaming CC messages to my PAiA MIDI2CV by simply executing the transmitter ISR code on 1 mS timer interrupts. Since MIDI bytes are ~ 320 uS this puts a ~680 uS pause between bytes. At least I know my code logic executes correctly. I've measured the ISR routine and it's ~200 uS long which leads me to believe MIDI output interrupts will never really work since over 60% of the available processing time between interrupts will be spent in the ISR. Perhaps leaving it as is with transmiting the data during the timer interrupts would be best. I've sent a support ticket into BasicMicro. We'll see what they say. When I wrote the code for my interrupt MIDI input the oninterrupt for serial input did not function. Perhaps they only corrected half ... Anyone done any work with MIDI output or feel like playing around with interrupt code? Send me an email. Dave