Help understanding the SC16IS740 datasheet. SPI to UART registers
Posted: Wed Mar 30, 2022 11:26 am
Hi all, I am back with a simple question. I am using a pyboard to communicate with a six devices over UART. Of course it only has five UARTs available so I am using a breakout board with a SC16IS740 SPI to UART converter. https://www.digikey.com/en/products/det ... 49/9960305
I am not getting it to respond the way I expect it to and need help to confirm I am reading the datasheet correctly. Here is the datasheet: https://www.nxp.com/docs/en/data-sheet/ ... 50_760.pdf
The list of registers is on page 21.
I am trying to do the following:
- Write to the LCR register (0x03)--allow setting the special registers, set parity to none, stops bits to 1, and data bits to 8.
- Write the special registers (0x00 and 0x01)--set a divisor of 12 for 9600 baud rate
- Write to the LCR register again
- Read the RCR register (0x00)
So I am sending the following (binary and hex):
- LCR register write: 0001 1000 1000 0011: 0x18 0x83
- DLL register write: 0000 0000 0000 1100: 0x00 0x0C
- DLH register write: 0000 1000 0000 0000: 0x08 0x00
- LCR register write: 0001 1000 0000 0011: 0x18 0x03
- RCR register read: 1000 0000: 0x80
I also believe the polarity and phase are both 0 based on page 43.
Does this look correct?
I am not getting it to respond the way I expect it to and need help to confirm I am reading the datasheet correctly. Here is the datasheet: https://www.nxp.com/docs/en/data-sheet/ ... 50_760.pdf
The list of registers is on page 21.
I am trying to do the following:
- Write to the LCR register (0x03)--allow setting the special registers, set parity to none, stops bits to 1, and data bits to 8.
- Write the special registers (0x00 and 0x01)--set a divisor of 12 for 9600 baud rate
- Write to the LCR register again
- Read the RCR register (0x00)
So I am sending the following (binary and hex):
- LCR register write: 0001 1000 1000 0011: 0x18 0x83
- DLL register write: 0000 0000 0000 1100: 0x00 0x0C
- DLH register write: 0000 1000 0000 0000: 0x08 0x00
- LCR register write: 0001 1000 0000 0011: 0x18 0x03
- RCR register read: 1000 0000: 0x80
I also believe the polarity and phase are both 0 based on page 43.
Does this look correct?