Enables digital communication with devices over TTL serial (0-5v signaling). Baud rates of 2400-115200.

Note that the TTL serial mode conflicts with SPI and I2C modules--only one can be used at a given moment.

The transmit pin is C6 and the receive pin is C7 on the PIC18F series.

**NOTE:** Do NOT leave the input pin (C7) floating! If it is not in use, it must be grounded, otherwise the hardware UART module will behave strangely and may lock up the firmware.

-----

**/ttl/baud** : Get/set baud rate, argument is int-32

TX: [ /ttl/baud ]
RX: [ /ttl/baud ,i 115200 ]
TX: [ /ttl/baud ,i 9600 ]
RX: [ /ttl/baud ,i 9600 ]

-----

**/ttl/enable** : Turn on/off serial module.

TX: [ /ttl/enable ]
RX: [ /ttl/enable ,i 0 ]
TX: [ /ttl/enable ,i 1 ]
RX: [ /ttl/enable ,i 1 ]

-----

**/ttl/tx** : Transmit data, input argument can be a blob (with string), null-terminated ASCII string (null is not transmitted) or a list of integers. Returns number of bytes sent. Up to about 48 bytes can be transmitted in a single message, but may induce a significant delay at low baud rate.

TX: [ /ttl/tx ,s "ABC" ]
RX: [ /ttl/tx ,i 3 ]
TX: [ /ttl/tx ,iii 65 66 67 ]
RX: [ /ttl/tx ,i 3 ]
TX: [ /ttl/tx ,b 3 (65 66 67) ]
RX: [ /ttl/tx ,i 3 ]

-----

**/ttl/rx**: Receive data from serial port. This is not a message that is sent to the device, but is automatically generated when data is detected. Due to current memory limitations the maximum sustained baud rate for incoming data is about 9600.

RX: [ /ttl/rx ,b 16 (................) ]