printing midi data to serial terminal - troubleshooting
Hi all,
I am trying to print midi data on pin 0 to my serial terminal. I think I may have the wrong type of optocoupler in my circuit, but I thought I would run my code by you all before I buy new ones. Because I'm reading and writing serial data from two different sources I thought maybe there could be an issues with different baud speeds in my code. Here is what I have:
Let me know if this looks fine to you all for my purposes. If so, than I know it's my midi schematic. I should mention that my serical code is reading all -1 unless I put the if block.
Thanks!
I am trying to print midi data on pin 0 to my serial terminal. I think I may have the wrong type of optocoupler in my circuit, but I thought I would run my code by you all before I buy new ones. Because I'm reading and writing serial data from two different sources I thought maybe there could be an issues with different baud speeds in my code. Here is what I have:
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
OBJ
pst : "Parallax Serial Terminal"
midi : "FullDuplexSerial"
PUB main
pst.Start(115200)
midi.start( 0, 1, 00, 31250 )
repeat
if midi.rxcheck <> -1
pst.dec(midi.rxcheck)
pst.str(string(" "))
Let me know if this looks fine to you all for my purposes. If so, than I know it's my midi schematic. I should mention that my serical code is reading all -1 unless I put the if block.
Thanks!

Comments
I'll try this out when I get home.
repeat pst.hex(midi.rx,2) pst.char(" ")Hex makes more sense with MIDI data than DecAndy
Thanks for the tips!