Lab 6 0.20.04 - MIDI
IDI output requires a PIC program stating which note to repeat on the synthesizer. I used the basic circuit from the lab.
DEFINE OSC 20
DEFINE HSER_RCSTA 90h ' enable the receive register
DEFINE HSER_TXSTA 20h ' enable the transmit register
DEFINE HSER_BAUD 31250 ' set the baud rate
main:
' noteon channel 1, middle A, middle velocity
hserout [$90, $45,$40]
pause 1000
' noteoff channel 1, middle A
hserout [$80, $45, $00]
goto main
IDI output requires a PIC program stating which note to repeat on the synthesizer. I used the basic circuit from the lab.
DEFINE OSC 20
DEFINE HSER_RCSTA 90h ' enable the receive register
DEFINE HSER_TXSTA 20h ' enable the transmit register
DEFINE HSER_BAUD 31250 ' set the baud rate
main:
' noteon channel 1, middle A, middle velocity
hserout [$90, $45,$40]
pause 1000
' noteoff channel 1, middle A
hserout [$80, $45, $00]
goto main
IDI output requires a PIC program stating which note to repeat on the synthesizer. I used the basic circuit from the lab.
DEFINE OSC 20
DEFINE HSER_RCSTA 90h ' enable the receive register
DEFINE HSER_TXSTA 20h ' enable the transmit register
DEFINE HSER_BAUD 31250 ' set the baud rate
main:
' noteon channel 1, middle A, middle velocity
hserout [$90, $45,$40]
pause 1000
' noteoff channel 1, middle A
hserout [$80, $45, $00]
goto main
Note the 20 Mhz clock on the chip - this is required for MIDI. Another very important fact for PIC BASIC PRO - set the oscillator to HS (High Speed), otherwise the MIDI won't work.
This is the sythesizer I used - it worked after a couple of tries. The knob on the right sets the instrument. To test the synthesizer, press the tone button on the pad to get a tone.
DEFINE OSC 20
DEFINE HSER_RCSTA 90h ' enable the receive register
DEFINE HSER_TXSTA 20h ' enable the transmit register
DEFINE HSER_BAUD 31250 ' set the baud rate
main:
' noteon channel 1, middle A, middle velocity
hserout [$90, $45,$40]
pause 1000
' noteoff channel 1, middle A
hserout [$80, $45, $00]
goto main
IDI output requires a PIC program stating which note to repeat on the synthesizer. I used the basic circuit from the lab.
DEFINE OSC 20
DEFINE HSER_RCSTA 90h ' enable the receive register
DEFINE HSER_TXSTA 20h ' enable the transmit register
DEFINE HSER_BAUD 31250 ' set the baud rate
main:
' noteon channel 1, middle A, middle velocity
hserout [$90, $45,$40]
pause 1000
' noteoff channel 1, middle A
hserout [$80, $45, $00]
goto main
IDI output requires a PIC program stating which note to repeat on the synthesizer. I used the basic circuit from the lab.
DEFINE OSC 20
DEFINE HSER_RCSTA 90h ' enable the receive register
DEFINE HSER_TXSTA 20h ' enable the transmit register
DEFINE HSER_BAUD 31250 ' set the baud rate
main:
' noteon channel 1, middle A, middle velocity
hserout [$90, $45,$40]
pause 1000
' noteoff channel 1, middle A
hserout [$80, $45, $00]
goto main
Note the 20 Mhz clock on the chip - this is required for MIDI. Another very important fact for PIC BASIC PRO - set the oscillator to HS (High Speed), otherwise the MIDI won't work.
This is the sythesizer I used - it worked after a couple of tries. The knob on the right sets the instrument. To test the synthesizer, press the tone button on the pad to get a tone.

