I've got no response from BasicMicro on their serial transmit interrupts not working. I have, however, modified my code for an interesting workaround. I am using TimerA to generate 512 uS interrupts and using this as my transmit interrupt. In the routine to put a byte into a buffer I enable the timerA interrupt. In the interrupt service routine I disable the timerA interrupt if the buffer is empty. I've been able to get the interrupt service routine down to 150 uS so it's quite functional. I now have my code running with interrupt driven midi-in using a 128 byte cyclic buffer midi-out using 512 uS interrupts using a 128 byte cyclic buffer timerW with 1 mS interrupts for various timekeeping processing It's hard to believe that this processor will function with all three interrupts simultaneously. I know that I cannot stream midi continuously since I receive at 320 uS and transmit at 512 uS but I can adjust the buffer sizes and there is plenty of ram available. The code is in my folder as "psim template (rev0.51).djb.bas". If they ever get the transmit interrupts working it will be easy to adjust the code. These would also be great routines to rewrite in assembly. Dave --- In SynthModules@yahoogroups.com, "djbrow54" <davebr@e...> wrote: > 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 > spentin 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
Message
Re: Anyone interested in helping with interrupt MIDI output?
2005-05-06 by djbrow54
Attachments
- No local attachments were found for this message.