Creative SB0350 Hardware Programming Guide - Page 78
Creative SB0350 Manual
View all Creative SB0350 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 78 highlights
MIDI Port I/O Programming 5-3 Sending MIDI Data The following contrasts the difference between sending MIDI data in Normal mode and UART mode: Normal Mode Under MIDI Normal mode, all the MIDI out data must be preceded by a MIDI output command. The following assembly code fragment shows the process of sending MIDI data to the DSP. Assume that WriteDSP is a procedure that writes data in the AL register to the DSP: mov call mov call al,38h WriteDSP al,bMidiData WriteDSP ; ; ; ; Output MIDI data command Send command to the DSP MIDI data to be sent out Send MIDI data ;**** Repeat the process to send out more MIDI data UART mode In order to send MIDI data in UART mode, DSP commands 34h, 35h, 36h or 37h must first be sent to the DSP to switch the interface into UART mode. Once in UART mode, a read from the DSP reads MIDI data, and a write to the DSP sends MIDI data. To terminate UART mode, send a DSP reset command. The reset command behaves differently while the DSP is in MIDI UART mode. It terminates MIDI UART mode and restores all the DSP parameters to the states prior to entering MIDI UART mode. If your application was run in MIDI UART mode, it important that you send the DSP reset command to exit the MIDI UART mode when your application terminates.