Shop OBEX P1 Docs P2 Docs Learn Events
Half duplex using fdserial.h? — Parallax Forums

Half duplex using fdserial.h?

Little-endianLittle-endian Posts: 91
edited 2014-11-10 21:35 in Propeller 1
I'm developing a Propeller application that interfaces with a half-duplex serial device using one wire for the singal. The device I'm communicating with has a pullup to 3.6v and I have a 220 ohm resistor between the device and the Prop pin. Receiving from the device I'm interfacing to has been working great using fdserial.h. I haven't tried transmitting anything yet because I wanted to make sure I won't damage my Prop or my serial device if fdserial.h makes the Prop pin an output that already has a pullup on it. Can fdserial.h use the same pin for TX and RX? Do I need to add anything to my circuit to make this work? Just being overly cautions here.

I realize serial.h is for half-duplex connections, but it doesn't appear to have all the features and functionality of fdserial.h.

Comments

  • DavidZemonDavidZemon Posts: 2,973
    edited 2014-11-06 05:36
    Does your application depend on a buffered UART or would unbuffered suffice? Also, what requirements do you have that serial.h does not support?

    Sorry I can't directly answer your question. I don't know fdserial well enough.
  • Little-endianLittle-endian Posts: 91
    edited 2014-11-06 10:35
    Does your application depend on a buffered UART or would unbuffered suffice? Also, what requirements do you have that serial.h does not support?

    Sorry I can't directly answer your question. I don't know fdserial well enough.

    Buffered for RX, not sure I need it for TX. I'm using fdserial_rxReady and didn't see a similar function for serial.h, unless I missed it.
  • DavidZemonDavidZemon Posts: 2,973
    edited 2014-11-06 11:54
    Okay. I will, someday, have a new implementation of buffered UART in PropWare. I will make a mental note to come back here and let you know when its done.
  • jazzedjazzed Posts: 11,803
    edited 2014-11-07 00:04
    Buffered for RX, not sure I need it for TX. I'm using fdserial_rxReady and didn't see a similar function for serial.h, unless I missed it.

    There isn't one. The serial.h library runs in the same cog as the main program (saving a cog and hub ram space but losing flexibility). The goal of the serial library is to provide a simple debug console. If you need rxReady, use fdserial.
  • Little-endianLittle-endian Posts: 91
    edited 2014-11-10 21:35
    jazzed wrote: »
    There isn't one. The serial.h library runs in the same cog as the main program (saving a cog and hub ram space but losing flexibility). The goal of the serial library is to provide a simple debug console. If you need rxReady, use fdserial.

    Thanks jazzed. Doing some more searching since my original post I think I may have my question resolved. I just need to find some time to test it. Hopefully by the end of the week.
Sign In or Register to comment.