Shop OBEX P1 Docs P2 Docs Learn Events
What's the fastest PC communication ? — Parallax Forums

What's the fastest PC communication ?

MagIO2MagIO2 Posts: 2,243
edited 2010-01-24 21:09 in Propeller 1
What speeds can you squeeze out of a PC - Propeller connection? And how do you do it?



·

Comments

  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2010-01-23 21:33
    Stuff it into the FSB, it probably won't communicate back though.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Style and grace : Nil point
  • Mike GreenMike Green Posts: 23,101
    edited 2010-01-23 21:49
    Maximum speeds depend too much on the internals of the PC's serial driver (or USB) driver for anything definitive to be said. The FullDuplexSerial driver can go faster than 230KBps. Over time, people have experimented with Prop half duplex drivers that can handle higher data rates, at least up to 1MBps. I think there have been Prop to Prop serial connections on the order of 3MHz. You'll have to search the forum for previous postings on this.
  • VIRANDVIRAND Posts: 656
    edited 2010-01-23 21:50
    Parallel Port LPT1
    or
    if the PC and Propeller are next to each other, sharing an SD card or two? 1+GB per the speed of either.

    both USB and TCP/IP are loaded with around 50% overhead, and the PC in general wastes bandwidth.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    VIRAND, If you spent as much time SPINNING as you do Trolling the Forums,
    you'd have tons of awesome code to post!
    (Note to self)
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2010-01-24 01:50
    Doesn't Hanno use an ASM driver with the FTDI chip to get around 1MB full duplex for his ViewPort product?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
    www.tdswieter.com
  • HannoHanno Posts: 1,130
    edited 2010-01-24 02:03
    Howdy,
    Yes, I've spent much time optimizing my "conduit.spin" object which I use for the PropScope, ViewPort and 12Blocks. It auto-detects baud-rate and allows either 115kbps, 1mbps, or 2mbps. Data is sent in packets, which can contain video frames, sampled data, arrays, strings, fuzzy logic configuration, or user data. The connection is full-duplex. The layers of caches and virtualization in modern OS's made this much more difficult that it should have been. My development kits (samples in VB.NET, python, C#, DDE, Delphi) make it easy for people to write PC applications which communicate with the Propeller- for an example look at Bob's "add-ons". See more here: hannoware.com/viewport
    Hanno

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Co-author of the official Propeller Guide- available at Amazon
    Developer of ViewPort, the premier visual debugger for the Propeller (read the review here, thread here),
    12Blocks, the block-based programming environment (thread here)
    and PropScope, the multi-function USB oscilloscope/function generator/logic analyzer
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-01-24 02:07
    Hi Hanno,

    Any chance of supporting 230kbps and 460kbps?

    It would make ViewPort run better with my new SerPlug smile.gif
    Hanno said...
    Howdy,
    Yes, I've spent much time optimizing my "conduit.spin" object which I use for the PropScope, ViewPort and 12Blocks. It auto-detects baud-rate and allows either 115kbps, 1mbps, or 2mbps. Data is sent in packets, which can contain video frames, sampled data, arrays, strings, fuzzy logic configuration, or user data. The connection is full-duplex. The layers of caches and virtualization in modern OS's made this much more difficult that it should have been. My development kits (samples in VB.NET, python, C#, DDE, Delphi) make it easy for people to write PC applications which communicate with the Propeller- for an example look at Bob's "add-ons". See more here: hannoware.com/viewport
    Hanno
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com 5.0" VGA LCD in stock!
    Morpheus dual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory/IO kit $89.95, both kits $189.95 SerPlug $9.95
    Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
    Las - Large model assembler Largos - upcoming nano operating system
  • fullspecengfullspeceng Posts: 76
    edited 2010-01-24 03:01
    I implemented a Propeller FT245R driver and get around 1 megabyte/sec true sustained transfer throughput over usb2 (8 megabits).

    On the PC side, there is no problem using the D2xx drivers but I need to be sending 4kByte packets or larger otherwise the speed drops significantly.

    The FT245R async protocol is very simple to implement but takes 12 i/o pins.

    Because you have true hardware handshaking, you only need to minimal packet preparation while using the FT245R unlike RS232 8n1.

    I will release code into the obex eventually if there is interest.

    I'd like to try the newer FT2232H chips soon but they require a lot more external components. Supposedly no changes are needed on either the propeller or PC side and you can get 25 megabytes/sec (I think the propeller would be able to support around 8-10megabytes/sec using 10mhz input) from the 400mhz clock and 4k buffer.
  • HannoHanno Posts: 1,130
    edited 2010-01-24 03:22
    Hi Bill,
    Those are odd rates! Give me some time- very backed up right now...
    Hanno

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Co-author of the official Propeller Guide- available at Amazon
    Developer of ViewPort, the premier visual debugger for the Propeller (read the review here, thread here),
    12Blocks, the block-based programming environment (thread here)
    and PropScope, the multi-function USB oscilloscope/function generator/logic analyzer
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-01-24 03:27
    Thanks!

    No hurry, I am not getting my production run of boards for 2-3 weeks... and later is fine too, as long as they are eventually supported.

    High speed comm cards support those rates, and so do some USB to serial converters.
    Hanno said...
    Hi Bill,
    Those are odd rates! Give me some time- very backed up right now...
    Hanno
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com 5.0" VGA LCD in stock!
    Morpheus dual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory/IO kit $89.95, both kits $189.95 SerPlug $9.95
    Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
    Las - Large model assembler Largos - upcoming nano operating system
  • DynamoBenDynamoBen Posts: 366
    edited 2010-01-24 04:08
    fullspeceng said...
    I implemented a Propeller FT245R driver and get around 1 megabyte/sec true sustained transfer throughput over usb2 (8 megabits).

    I will release code into the obex eventually if there is interest.

    I did some work a while back with the FT245 but couldn't get the speed I needed. I would be interested in seeing how you did it.
  • MagIO2MagIO2 Posts: 2,243
    edited 2010-01-24 11:40
    Thanks a lot to all of you!

    I'd be interested in the FT245R driver as well, as IO pins is not a problem. Only pins for the EEPROM and SD cards are needed.
  • fullspecengfullspeceng Posts: 76
    edited 2010-01-24 21:09
    I'll clean up the code and post it sometime soon as it's being used in a commerical product. The key is that data needs to be written in 4kB or greater blocks. You can't do a single byte loopback and get reasonable speed. You need to store 4kB into a buffer then send it back.

    Also I noticed half the speed using the .NET C# instead of the C++ interface sometimes so try compiling it using the direct D2xx calls. I also hear there are speed issues on Macs and Linux but I use Win 7 x64.
Sign In or Register to comment.