« Close

Datasheets and User Guides

App Notes

Software & Driver

 

5.2.18 - AsynchConfig

Configures the U6 UART for asynchronous communication.  Communication is in the common 8/n/1 format. Similar to RS232, except that the logic is normal CMOS/TTL. Connection to an RS232 device will require a converter chip such as the MAX233, which inverts the logic and shifts the voltage levels.

The TX (transmit) and RX (receive) lines appear on FIO/EIO after any timers and counters, so with no timers/counters enabled, and pin offset set to 0, TX=FIO0 and RX=FIO1.

 

Table 5.2.18-1. AsynchConfig Command Response

Command:    
Byte    
0 Checksum8  
1 0xF8  
2 0x02  
3 0x14  
4 Checksum16 (LSB) 
5 Checksum16 (MSB) 
6 0x00  
7 AsynchOptions 
    Bit 7: Update
    Bit 6 :UARTEnable
    Bit 5: Reserved
8-9 BaudFactor16 
     
     
Response:    
Byte    
0 Checksum8  
1 0xF8  
2 0x02  
3 0x14  
4 Checksum16 (LSB) 
5 Checksum16 (MSB) 
6 Errorcode  
7 AsynchOptions 
8-9 BaudFactor16 
  • AsynchOptions:
    Bit 7: Update If true, the new parameters are written (otherwise just a read is done).
    Bit 6: UARTEnable If true, the UART module is enabled. Note that no data can be transfered until pins have been assigned to the UART module using the ConfigIO function.
  • BaudFactor16: This 16-bit value sets the baud rate according the following formula: BaudFactor16 = 216 - 48000000/(2 * Desired Baud). For example, a BaudFactor16 = 63036 provides a baud rate of 9600 bps.