designer
- 7th September 2006, 19:00
I've been using a 16F877 to try to send ordinary MIDI commands (note on, note off) to a Roland SP-404 sampler in response to push button presses. So far, no luck. Here are my commands for a test program:
DEFINE OSC 20
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 24h
DEFINE HSER_BAUD 31250
START: HSEROUT [HEX 144, HEX 71, HEX 127]
pause 1000
goto start
The MIDI format in the specs is:
9nH kkH vvH
n=MIDI channel, kk=note number, and vv= note velocity.
The PIC runs at 20 mHz, so I configure the compiler to program at oscilator XT setting. The scope shows serial data coming out of the PIC at 1 sec intervals. The sampler is correctly loaded with sound files, and it plays well manually. I transmit on channel 1. The sampler plays correctly with an external MIDI keyboard. However, on the scope, the baud rate of the external keyboard is significantly faster than the baud rate of the PIC output.
Does anyone have any ideas?
Ian
DEFINE OSC 20
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 24h
DEFINE HSER_BAUD 31250
START: HSEROUT [HEX 144, HEX 71, HEX 127]
pause 1000
goto start
The MIDI format in the specs is:
9nH kkH vvH
n=MIDI channel, kk=note number, and vv= note velocity.
The PIC runs at 20 mHz, so I configure the compiler to program at oscilator XT setting. The scope shows serial data coming out of the PIC at 1 sec intervals. The sampler is correctly loaded with sound files, and it plays well manually. I transmit on channel 1. The sampler plays correctly with an external MIDI keyboard. However, on the scope, the baud rate of the external keyboard is significantly faster than the baud rate of the PIC output.
Does anyone have any ideas?
Ian