Shop OBEX P1 Docs P2 Docs Learn Events
UART interface — Parallax Forums

UART interface

teganburnsteganburns Posts: 134
edited 2012-11-29 00:04 in Propeller 1
I have a few new toys that interface via UART connection. One being the ls_uart_wifi module.
http://www.google.com/url?sa=t&source=web&cd=1&ved=0CDUQFjAA&url=http%3A%2F%2Fwww.linksprite.com%2Fpub%2FLinkSprite-UART-WiFi.pdf&ei=1Yu0UPaHGq2ByAH9nYDoDQ&usg=AFQjCNEgB3fQIqAR6nOXspemfZpzafywDA

If anyone could write some example code to help me get started with interfacing UART devices that would be great!

Comments

  • MagIO2MagIO2 Posts: 2,243
    edited 2012-11-27 02:19
    Did you have a look into the sticky thread " Propeller Education Kit Labs, Tools, and Applications"?

    Here you'll find some examples of how to use the FullDuplexSerial or the SimpleSerial in

    Propeller <-> PC Terminal Communication·-·Updated·(1/25/09)
    or Debug LITE for the Parallax Serial Terminal
  • teganburnsteganburns Posts: 134
    edited 2012-11-27 02:54
    could you post a link?
  • pmrobertpmrobert Posts: 675
    edited 2012-11-27 06:12
    http://forums.parallax.com/showthread.php?89958-Propeller-Education-Kit-Labs-Tools-and-Applications is what Mag referenced by "Did you have a look into the sticky thread " Propeller Education Kit Labs, Tools, and Applications"?
  • teganburnsteganburns Posts: 134
    edited 2012-11-28 00:08
    I checked the link that pmrobert posted... Nothing on UART interface in the debug lite section or the Pst section. Any other ideas?
  • MagIO2MagIO2 Posts: 2,243
    edited 2012-11-28 01:05
    What kind of UART interface are you interested in?
    (UART = Universal Asynchronous Receiver Transmitter)

    The serial interface is one kind of an UART which of course can come along in several flavours:
    You can have a serial interface via USB, you can have RS232, but most common in chip to chip communication is just connect an Rx Tx pair of one device with the Tx Rx pair of another device maybe with some level shifting if one device is 5V and the other is 3.3V.

    So, the mentioned link should give you an overview of how to program with the SimpleSerial or the FullDuplexSerial objects. The rest is on reading specs of your wifi - module. What does the protocol look like, which commands do exist and so on ...
  • teganburnsteganburns Posts: 134
    edited 2012-11-28 23:37
    I'm having trouble finding anything on The FullDuplexSerial object...? I found basic parallax serial terminal stuff but that's about it.

  • MagIO2MagIO2 Posts: 2,243
    edited 2012-11-29 00:04
    FullDuplexSerial (FDS) is part of the PropellerTool installation. I think there should not be a big difference compared to the SimpleSerial. Usually in objects the description is included as comments and it's pretty easy to find out which functions exist by clicking on Summary - radio button in the PropellerTool.

    So, basically FDS has functions like
    rx for receiving a byte (blocking)
    tx for sending a byte
    str for sending a whole string
    dec for sending a number in decimal string representation
    hex for sending a number in hexadecimal string representation
    rxcheck to check whether a byte is available
    rxtime for receiving a byte but only blocks for a certain time

    The biggest difference from my point of view is, that SimpleSerial is written in SPIN and has a speed-limit (I think it works up to 19200baud/s). The FDS is written in PASM.
    I think in the obex there are other serial interface objects which added some functionality to the basics, so you might want to check whether some of those can save you some coding-time. (use the Summary view)
    I never used something else so far.
Sign In or Register to comment.