Shop OBEX P1 Docs P2 Docs Learn Events
Propeller serial receive at 230 kbps or 460 kbps — Parallax Forums

Propeller serial receive at 230 kbps or 460 kbps

smbakersmbaker Posts: 164
edited 2014-11-13 10:17 in Propeller 1
I want to send data from a Raspberry Pi to a propeller, preferably at 460 kbps. I could probably get by at 230 kbps. My needs are unidirectional. The propeller only needs to receive, it doesn't need to transmit.

I've found lots of objects and threads, dating back as far as 2009. The best candidates I found were Peter Jakacki's FastSerial (not in OBEX; found in a thread here in the forum), and Multiple Serial Port Driver (Tim Moore, OBEX). Ideally it would be nice to have a 512 byte receive buffer.

I'm suffering a little bit of information overload at the vast assortment of available prop serial objects. Can someone make a recommendation?

Thanks,
Scott

Comments

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-11-13 03:15
    smbaker wrote: »
    I want to send data from a Raspberry Pi to a propeller, preferably at 460 kbps. I could probably get by at 230 kbps. My needs are unidirectional. The propeller only needs to receive, it doesn't need to transmit.

    I've found lots of objects and threads, dating back as far as 2009. The best candidates I found were Peter Jakacki's FastSerial (not in OBEX; found in a thread here in the forum), and Multiple Serial Port Driver (Tim Moore, OBEX). Ideally it would be nice to have a 512 byte receive buffer.

    I'm suffering a little bit of information overload at the vast assortment of available prop serial objects. Can someone make a recommendation?

    Thanks,
    Scott

    I suppose I could dress up FastSerialReceive for the OBEX then. This one is timing accurate for back to back data with one stop bit up to 2M baud and up to 3M with gaps equivalent to 2 stop bits. Most serial transmissions at high speed fail to provide 100% throughput so it is not unusual to see gaps between characters. The object has a very small footprint of just over 512 bytes which is reused for the serial buffer once it has started but this means that if you need to load multiple cogs (which I believe you don't) that you require multiple copies of the same object, but of course this is no problem either.

    The object has reset on break detection but I can make an option to turn that off, although I always find it very useful. To make this an object I only really need to add the Spin methods for starting and reading the buffer etc.
  • JonnyMacJonnyMac Posts: 9,105
    edited 2014-11-13 07:47
    When I only need RX I used the attached object.
  • smbakersmbaker Posts: 164
    edited 2014-11-13 10:17
    JonnyMac wrote: »
    When I only need RX I used the attached object.

    Nice. That's simple enough that even I can almost understand the assembly language bits. ;)
Sign In or Register to comment.