SB16C1054_Data Sheet_EN
SB16C1054
QUAD UART WITH 256-BYTE FIFO
FEBRUARY 2009 REV 1.0
5
47
Table 26: SB16C1054 Programming Guide
Command Action
Initialize Process
1. Set Baud Rate to 0001h Read LCR, then save in temp
Set LCR to 80h
Set DLL to 01h
Set DLM to 00h
Set LCR to temp
2. Set TTR to 20h Set LCR to BFh
Set PSR to A5h
Set TTR to 20h
3. Set RTR to 80h Set RTR to 80h
4. Enable 256-byte FIFO Set AFR to 01h
5. Set Line Control Register to 8-data but,
no parity, 1 stop bit
Set PSR to A4h
Set LCR to 03h
6. Enable TX, RX interrupts Set IER to 03h
Serial Output Process
1. TX Interrupt is generated and jumped to
Interrupt Service Routine
2. Read ISR
3. Check TX Interrupt Status
4. Read TX FIFO Count
5. Read Data
6. Output TX
5. Read Data
6. Output TX
Read ISR, then save in temp1
If temp1 = xx00_0100b then
Goto RX Interrupt Service Routine
Else if temp1 = xx00_0010b then
Goto TX Interrupt Service Routine
Else
Return from Interrupt Service Routine
RX Interrupt Service Routine:
…..
TX Interrupt Service Routine:
Read MCR, save in temp2
Set MCR to (temp2 OR 40h)
Read TCR, save in temp3
Set MCR to temp2
If temp1[7] = 1b then
For (Cnt = 0; Cnt <= 127; Cnt++)
Read TX_Data from TX_User_Buffer
Set THR to TX_Data
Else if temp3 > 128 then
For (Cnt = 0; Cnt <= 127; Cnt++)
Read TX_Data from TX_User_Buffer
Set THR to TX_Data
Else