Shop OBEX P1 Docs P2 Docs Learn Events
Serial out Pin question — Parallax Forums

Serial out Pin question

garylakegarylake Posts: 41
edited 2010-12-08 13:26 in Propeller 1
Can you use a different Pin for serial out besides P30.

Comments

  • LeonLeon Posts: 7,620
    edited 2010-12-05 07:54
    You can use any pin.
  • StefanL38StefanL38 Posts: 2,292
    edited 2010-12-05 14:03
    Leon is right you can use any other PIN.
    As you stated PIN 30 this is the one which is connected to the serial-to-USB-adapter.

    If you use any other pin you have to take care of the elcetric compatibility yourself.
    For example most serial-LCDs have a 5V interface. The Prop-IO-pins have only 3.3V.
    If you want to connect it to a 5v serial LCD you might need a voltage-levelshifter
    and for receiving data from a 5V devive you minimum need a 2.2kOhm-resistor to avoid damage
    to the prop-IO-Pin.

    On PCs serial interfaces are specified as RS232 which use +-12V as signal levels. Here you need a MAX3222 to connect a 3.3V TTL serial to +-12V RS232 serial

    To get further advice can you please tell us in detail what you would like to do?

    best regards

    Stefan
  • garylakegarylake Posts: 41
    edited 2010-12-05 14:59
    I just want send data to midi din 5 connector so I can hear my midi keyboard play just one note and then I would be happy.
    I tried this, and it doesn't work. It is sending something but nothing the keyboard can recognize as for as data goes.

    VAR
    Byte Command
    Byte Velocity
    Byte Note
    Byte Channel
    OBJ
    MidiSend : "FullDuplexSerial"
    PUB Main
    MidiSend.start(15, 17, 0, 31250)
    MidiSend.tx(Channel)
    MidiSend.tx(Note)
    MidiSend.tx(Velocity)
    MidiSend.tx(Command)
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-12-05 15:04
    You have to set your byte variables to something your keyboard recognizes. They're initialized to zero, and you haven't changed them to anything else.

    BTW, enclose your posted code in [noparse]
    ...
    
    [/noparse] tags to preserve indentatioon.

    -Phil
  • StefanL38StefanL38 Posts: 2,292
    edited 2010-12-08 13:26
    Hi Gary,

    very good posting with the details that made the difference.

    I would have NEVER thought of MIDI through the keyword "serial"
    and even better you included your code.

    By doing this the answer was very specific and I guess already lead to the solution.

    best regards

    Stefan
Sign In or Register to comment.