to the UART module using the ConfigIO function.
BaudFactor16 (BaudFactor8)
: This 16-bit value sets the baud rate according the following formula: BaudFactor16 = 2
16
–
48000000/(2 x Desired Baud). For example, a BaudFactor16 = 63036 provides a baud rate of 9600 bps. (With hardware
revision 1.21, the value is only 8-bit and the formula is BaudFactor8 = 2
8
– TimerClockBase/(Desired Baud) ).
5.2.17 - AsynchTX
Requires U3 hardware version 1.21. Sends bytes to the U3 UART which will be sent asynchronously on the transmit line.
Command:
Byte
0
Checksum8
1
0xF8
2
1 + NumAsynchWords
3
0x15
4
Checksum16 (LSB)
5
Checksum16 (MSB)
6
0x00
7
NumAsynchBytesToSend
8
AsynchByte0
...
...
Response:
Byte
0
Checksum8
1
0xF8
2
0x02
3
0x15
4
Checksum16 (LSB)
5
Checksum16 (MSB)
6
Errorcode
7
NumAsynchBytesSent
8
NumAsynchBytesInRXBuffer
9
0x00
NumAsynchWords
: This is the number of asynch data bytes divided by 2. If the number of bytes is odd, round up and add
an extra zero to the packet.
NumAsynchBytesToSend
: Specifies how many bytes will be sent (0-56).
NumAsynchBytesInRXBuffer
: Returns how many bytes are currently in the RX buffer.
5.2.18 - AsynchRX
Requires U3 hardware version 1.21. Reads the oldest 32 bytes from the U3 UART RX buffer (received on receive terminal). The
buffer holds 256 bytes.
Command:
Byte
0
Checksum8
1
0xF8
2
0x01
3
0x16
4
Checksum16 (LSB)
5
Checksum16 (MSB)
6
0x00
7
Flush
Response:
Byte
0
Checksum8
1
0xF8
2
1 + NumAsynchWords
3
0x15
4
Checksum16 (LSB)
5
Checksum16 (MSB)
6
Errorcode
7
NumAsynchBytesInRXBuffer
8
AsynchByte0
...
...
39
AsynchByte31
Flush
: If nonzero, the entire 256-byte RX buffer is emptied. If there are more than 32 bytes in the buffer that data is lost.
NumAsynchBytesInRXBuffer
: Returns the number of bytes in the buffer before this read.
AsynchByte#
: Returns the 32 oldest bytes from the RX buffer.
5.2.19 - I²C
Requires U3 hardware version 1.21+. Sends and receives serial data using I²C (I2C) synchronous communication.
56