Shop OBEX P1 Docs P2 Docs Learn Events
Serial I/O - TX & RX baud rates — Parallax Forums

Serial I/O - TX & RX baud rates

Ken EKen E Posts: 1
edited 2006-07-19 23:39 in Propeller 1
I have been looking over the datasheet & am unclear. Is it possible to have the serial TX & serial RX at different baud rates? I am looking at receiving at 250kbps & transmitting at 115,200bps.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-07-18 04:41
    All I/O on the Propellor is done by software. There is a library "object" called "FullDuplexSerial" that you may be referring to that implements a UART. The receive and transmit Baud is the same the way the routines are written. You can either modify the software so the receive Baud and transmit Baud are different or simply run two separate copies, one in each of two cogs, and specify an invalid pin number (say 32) for the unused channel in each copy. If you set the mode to invert rx in the unused channel, it will never see a start bit and basically stay idle. I'm pretty sure the routines can do 115,200bps, but I don't know how well they do at 250kbps. I'm pretty sure that, if the transmit routines were stripped out, there'd be no problem keeping up with 250kbps on receive using a cog for just that function. That would be about 80 instructions per bit-time ... plenty of time.
  • pjvpjv Posts: 1,903
    edited 2006-07-18 11:48
    Hi Ken;

    I'm uncertain of the canned programs, but if you "spin your own" in assembler I'm sure the Propeller will easily handle rates well over 1 Mb/sec, and in somewhat more constrained cases, perhaps 10 Mega bits/sec.

    Cheers,

    Peter (pjv)
  • RetrobitsRetrobits Posts: 46
    edited 2006-07-19 22:49
    Based on this thread, can I assume that the Propeller should be able, comfortably, to handle a full-duplex 38,400 baud connection? This is important for a project I'd like to start working on.

    Thanks,

    - Earl
  • Mike GreenMike Green Posts: 23,101
    edited 2006-07-19 23:39
    The Propellor can comfortably handle well over 1Mb/sec half duplex with one cog with excellent timing (low bit jitter). Two cogs gets you very clean high-speed full-duplex. Additional pairs of cogs gets you more channels. I can't say for sure how well the existing library routines will do, but they should be able to handle 38,400 Baud full duplex in one cog. The logic and timing always gets more complicated when you're trying to do two overlapping functions simultaneously. I suspect there's increasing bit jitter with the existing routines as they're pushed faster.
Sign In or Register to comment.