midi out
William50
Posts: 22
I am using the following code to try and send a midi note-on command:
con
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
OBJ
out : "FullDuplexSerial"
Pub Main
out.start(9,7,%0000,31250)
repeat
out.tx(144)
out.tx(67)
out.tx(127)
Using a logic probe I can see data coming out of P7 however nothing is being played on my external midi synthesizer.
I know that the midi baud rate must be within a tight tolerance so I suspect that my _clkmode settings may be the problem.
con
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
OBJ
out : "FullDuplexSerial"
Pub Main
out.start(9,7,%0000,31250)
repeat
out.tx(144)
out.tx(67)
out.tx(127)
Using a logic probe I can see data coming out of P7 however nothing is being played on my external midi synthesizer.
I know that the midi baud rate must be within a tight tolerance so I suspect that my _clkmode settings may be the problem.
Comments
More likely to be a problem with signal polarity, hardware interface, or the synth isn't configured correctly.
In the dsPIC world I use MIDI out with the following:
+5V --> [noparse][[/noparse]220 ohm resistor] --> [noparse][[/noparse]MIDI connector pin 4]
Micro output on pin 6(Tx) --> [noparse][[/noparse]220 ohm resistor] --> [noparse][[/noparse]MIDI connector pin 5]
Connect pin 2 of the MIDI connector to ground
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Aka: CosmicBob
Post Edited (Bob Lawrence (VE1RLL)) : 3/22/2008 6:58:49 PM GMT
I had to set Bit2 when starting the FDS object.
It now reads:
out.start(9,7,%0100,31250)