Shop OBEX P1 Docs P2 Docs Learn Events
Half duplex with PST — Parallax Forums

Half duplex with PST

jnoguesjnogues Posts: 25
edited 2010-03-06 21:09 in Propeller 1
Hi all,

Is possible do a half duplex serial transmission with PST object or PST send and recived at time?

Jaume Nogues

Comments

  • JonnyMacJonnyMac Posts: 9,208
    edited 2010-03-06 17:39
    It's certainly possible with FullDuplexSerial. PST is a PC terminal program and, by definition, has separate TX and RX lines. I'm using FDS in half-duplex mode to allow comms between a BASIC Stamp and the Propeller (using Open-True mode).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon McPhalen
    Hollywood, CA
  • jnoguesjnogues Posts: 25
    edited 2010-03-06 17:45
    Hi Jon

    Sorry for my ignorance, what is open-true mode? is mode %0000 ?

    Jaume
  • kwinnkwinn Posts: 8,697
    edited 2010-03-06 18:00
    It is possible to use PST for half duplex with some hardware to connect the Rx/Tx lines, however if you were to type data in to PST at the same time the prop (or whatever uP) was sending data the result would be garbage. In most cases though the uP sends some data and waits for a response so this is not a problem.

    Open true mode allows for half duplex:

    '' mode bit 0 = invert rx
    '' mode bit 1 = invert tx
    '' mode bit 2 = open-drain/source tx - sets Tx pin to input (high impedance) when not sending data
    '' mode bit 3 = ignore tx echo on rx - ignores the character received when sending since Tx/Rx are on the same line.

    You can send/receive in half duplex using one or 2 lines, although 1 line is what it was intended for.

    Post Edited (kwinn) : 3/6/2010 6:23:41 PM GMT
  • JonnyMacJonnyMac Posts: 9,208
    edited 2010-03-06 19:13
    For open-true I use %1100 as the mode parameter -- this prevents data transmitted by the Propeller from ending up in its own receive buffer. I'm also use one pin for transmit and receive with a BASIC Stamp.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon McPhalen
    Hollywood, CA
  • jnoguesjnogues Posts: 25
    edited 2010-03-06 21:09
    Thanks for your help !!

    Jaume smile.gif
Sign In or Register to comment.