ProductsInterfaceSupportFAQ

Frequently asked questions

Industrial UART Programming FAQ

Q How do you program the SC2692 UART for 19.2Kbps, no parity, and 7-bit data with a 3.6864Mhz crystal?
A You can program the UART as follows:
  1. Set MR1[4:3] = 10 // no parity and MR1[1:0] = 10 // 7 data
  2. Set MR2[3:0] = 0111 // 1 stop
  3. Set ACR[7] = 1 // set 2: 19.2K
  4. Set CSR[7:4] = 1100 // 19.2K Rx and CSR[3:0] = 1100 // 19.2K Tx
Q How do you program a dual UART to get channel A for 19.2Kbps and channel B for 4800bps?
A The baud rates are in one column of the baud rate table, so if the X1 clock input is 3.6864Mhz, then (in normal mode) set ACR[7] = 1 and set CSRA[7:4] = 1100 for 19.2K and CSRB[7:4] = 1001 for 4800.
Q How do you program a dual UART to get channel A for 230.4Kbps and channel B for 115.2Kbps?
A The desired baud rates are not in one column of the baud rate table, so a crystal of 7.3728Mhz (2*3.6864Mhz) is used to double the baud rates in each column. In extended mode, set ACR[7] = 1 and set CSRA[7:4] = 1100 for 230.4K (115.2K*2) and CSRB[7:4] = 1011 for 115.2K (57.6K*2).
Q How do you program a quad UART to get 250K baud on both the send and receive ports using a 4Mhz crystal?
A The ratio between 4Mhz and 3.6864Mhz is 1.085 (4M/3.6864). Thus, the baud rates in the baud rate selection table will be increased by 1.085. For example, first write 0x01 to the address 0x2D to select the high baud rate. Second, set CSR[7:4] = 0xCC with ACR[7] = 0. The 230K will become 250K (230K*1.085).
Q How do you program the FIFO size in an SC28L91?
A Set up the UART as follows:
  1. Set MR0[3] to select the FIFO size.
  2. Set bit 6 of MR0 and MR1 to select the Rx FIFO interrupt fill level.
  3. Set MR0[5:4] to select the Tx FIFO interrupt fill level.
For example, set MR0[3] = 1 for 16 bytes FIFO, set MR0[6] and MR1[6] to 11 for 16 bytes in FIFO, and set MR[5:4] = 00 for 16 bytes empty.
Q How do you program the Multi-Purpose Output (MPO) pin as DC levels in the SC2691?
A The ACR and CR control the MPO pin. Setup as follows
  1. Set ACR[2:0] to 000 (RTSN).
  2. Set MR1[7] to 1 (RxRTS Control).
  3. Set CR[7:4] to 0xA (low) or 0xB (high).
Q How do you program MR0B[2:0] in the SC28L92?
A MR0B[2:0] bits are reserved. Return F on read.
Q How do you program an MR pointer?
A Setting CRA[7:4] to 0001 (0x1) causes the MR pointer to point to the MR1 register. Setting CRA[7:4] to 1011 (0xB) causes the MR pointer to point to the MR0 register. On each Read/Write of the MR registers, the MR pointer increments and stops at MR2 until set CRA[7:4] to 0x1 or 0xB.
Q How do you program CTS and RTS?
A
Set the bit that allows the CTS pin to control the transmitter. For example, set MR2[4] in the SC26C92. If the CTS input is driven high, the transmitter stops sending data. If the CTS input is low, the transmitter starts sending data.
Set the bit that allows the receiver to control the RTS pin. For example, set MR1[7] in the SC26C92. The receiver sets the RTS output high to indicate the receiver FIFO is full. If the RTS output is low, the receiver FIFO is available.
Q How do you program the transmitter to control the RTS pin?
A
Set the bit that allows the transmitter to control the RTS pin. For example, set MR2[5] in the SC26C92. The transmitter sets the RTS output high to indicate the transmitter has finished sending its last data byte.
Note: Programming the RTS pin to be controlled by the transmitter and by the receiver is not recommended.
Q How do you program for multi-drop mode?
A Set the parity mode in MR1 to multi-drop mode (for example, MR1[4:3]=11). Next, set the parity type in MR1 (for example, MR1[2]=0 for data and 1 for address).

Other Questions

If you have other questions that you would like answered, please contact us.
Standard ICs quick find
Standard ICs sections
See also