Shop OBEX P1 Docs P2 Docs Learn Events
Serial Port Speed — Parallax Forums

Serial Port Speed

KyeKye Posts: 2,200
edited 2013-03-21 12:38 in Propeller 1
Jazzed, David,

Could I get your suggestions on this issue: http://forums.parallax.com/showthread.php/146784-Serial-port-Speed

I'm really not sure what way to go. I'm working on build an Arduino 'like' Library for the propeller and I'm not sure how to design the serial port. I can get one cog to do 115200 on two ports with both RX and TX routines. Or, I can do 230400 for two ports in one cog with just RX routines. The TX will then have to be bit banged by the LMM core.

My problem is that I'm building an event loop based kernel for the Arduino 'like' Library that prefers non-blocking methods over blocking ones.

What do you think?

Comments

  • jazzedjazzed Posts: 11,803
    edited 2013-03-20 22:54
    Maybe we need bigger receive buffers in FDX (or a new variant). If I recall, currently both buffers are 16 bytes. Going to 128 byte buffers should help a lot.

    We can bit-bang output at 115200 in LMM using Simple Serial SSER.
  • ersmithersmith Posts: 6,092
    edited 2013-03-21 04:59
    Kye wrote: »
    I'm really not sure what way to go. I'm working on build an Arduino 'like' Library for the propeller and I'm not sure how to design the serial port. I can get one cog to do 115200 on two ports with both RX and TX routines. Or, I can do 230400 for two ports in one cog with just RX routines. The TX will then have to be bit banged by the LMM core.

    Obviously it depends on the application which would be best, but for the general case I think 115200 TX and RX in another cog would be more useful. 115200 is going to work in more contexts (not all PC applications will support 230400). I also would guess that most Propeller apps will generate more data than they receive -- there will be exceptions, of course, but even at 115200 baud it doesn't take very long to fill hub memory.

    Finally, it's easier to support output from multiple COGs if all the I/O is done in another COG. Bit-banging TX at the same time from two different COGs doesn't work very well :-).

    Eric
  • KyeKye Posts: 2,200
    edited 2013-03-21 12:38
    Thank you,

    I'm going to go with the RX and TX FIFOs in one cog at 115200 BPS.
Sign In or Register to comment.