Full Duplex Serial - rosco-pc/propeller-wiki GitHub Wiki

(and other asynchronous serial variations)

Full Duplex Serial Created by: Chip Gracey The original "Full Duplex Serial"
Extended Full Duplex Serial Created by: Martin Hebel Extensions to allow reception of character strings that end in a carriage return for decimal, hexadecimal and alpha-numeric uses. Allows use of timeout values. This version also allows use of defined delimiter characters, and returning whole and fractional portions of a numeric string.
Simple Serial Created by: Chip Gracey Bit-bang serial driver for low baud rate (~19.2K) devices.
  1. This driver is designed to be method-compatible with the FullDuplex serial object, allowing it to be used when high speed comms or devoting an independent cog for serial I/O is not necessary.
  2. Bi-directional communication on the same pin is also supported. | | SerialMirror | Created by: Mirror | A FullDuplexSerial enhancement that allows a single serial connection to be used from within multiple spin files. Primarily aimed as a debugging aid, this file also illustrates how to use the DAT section to make single-instance objects which may be called from multiple spin files. |

Designed for serial communications.

Examples of this code in use: PropCOMM,

.start(rxpin, txpin, mode, baudrate) Start serial driver - starts a cog mode bit 0 = invert rx mode bit 1 = invert tx mode bit 2 = open-drain/source tx mode bit 3 = ignore tx echo on rx

.rx(rxbyte) Receive a byte of data

.tx(txbyte) Send a byte of data

.str(stringptr) Send string. Example: str(string("Hello World"))

.dec(value) Print a decimal number

.hex(value, digits) Print a hexadecimal number

.bin(value, digits) Print a binary number