Shop OBEX P1 Docs P2 Docs Learn Events
midi out — Parallax Forums

midi out

William50William50 Posts: 22
edited 2008-03-22 23:23 in Propeller 1
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.

Comments

  • hippyhippy Posts: 1,981
    edited 2008-03-22 18:21
    I wouldn't have thought it's the _clkmode settings causing a problem, and MIDI usually has +/-6% tolerance like most other serial.

    More likely to be a problem with signal polarity, hardware interface, or the synth isn't configured correctly.
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2008-03-22 18:34
    How is your MIDI out hardware wired?

    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
  • William50William50 Posts: 22
    edited 2008-03-22 23:23
    Problem solved!

    I had to set Bit2 when starting the FDS object.

    It now reads:

    out.start(9,7,%0100,31250)
Sign In or Register to comment.