Shop OBEX P1 Docs P2 Docs Learn Events
MultiPortUART with C# (Windows) client — Parallax Forums

MultiPortUART with C# (Windows) client

Bob AndersonBob Anderson Posts: 122
edited 2008-01-15 10:10 in Propeller 1
This "object" is meant to be an aid in debugging the Propeller chip.· There is often a need to see output from and supply input to multiple cogs during development.

The attached Spin and PASM code implement an 8 channel UART to allow easy serial input and output from up to 8 sources (cogs, for example) in the propeller chip. Only 2 pins are actually used by preceding each byte with a channel identifier byte.· This multiplexing is kept transparent to the user by use of an associated Windows client that has 8 panels.· The full duplex serial code that runs in a single cog has been tested to 115,200 baud.

There are 8, 128 byte receive buffers on the propeller side.· Output is unbuffered on the propeller side, but the Windows client has a 4096 byte input buffer.

The output that is displayed in each panel of the Windows client can be directed to a file as well.

Each panel of the Windows client can perform formatting functions as well if the propeller sends formatting strings and values to be displayed enclosed in vertical bars.· Thus, the full power of C# formatted output becomes available to the propeller. (Of course, you need to know how to format strings in C#···cry.gif )

Comments

  • deSilvadeSilva Posts: 2,967
    edited 2008-01-14 00:03
    Yes, this has been missing from time to time.. Thanks!
  • Bob AndersonBob Anderson Posts: 122
    edited 2008-01-14 19:49
    The rationale behind the features of MultiUART:

    I use the propeller chip to read sensors like rate gyros. Often the devices are not well characterized as to their stability over time and temperature. As a consequence, in developing an application, I often need to start with a significant data acquisition and analysis effort. To do that, I use the MultiUART windows client capability of writing anything that it receives to a file. Since it helps to have those files formatted as input to a subsequent analysis program (plots, stats, etc), I added the feature to use C# formatting services. Multiple channels of serial I/O make it easy to control the data acquisition (start, stop, etc) without corrupting the log file(s).

    The C# code for the windows client is available to anyone who requests it. Unfortunately, I recently upgraded to Visual Studio 2008 and the "solution" is not useable with earlier versions of Visual Studio. With that caveat, if you can use the C# code, email or PM me.

    Post Edited (Bob Anderson) : 1/14/2008 11:21:59 PM GMT
  • simonlsimonl Posts: 866
    edited 2008-01-15 10:10
    Bob - this looks like what I've been waiting for - thank you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon
    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
    BTW: I type as I'm thinking, so please don't take any offense at my writing style smile.gif
Sign In or Register to comment.