SB16C1054_Data Sheet_EN

SB16C1054
QUAD UART WITH 256-BYTE FIFO
FEBRUARY 2009 REV 1.0
5
48
Table 26: SB16C1054 Programming Guide…continued
Command Action
5. Read Data
6. Output TX
For (Cnt = 0; Cnt < temp3; Cnt++)
Read TX_Data from TX_User_Buffer
Set THR to TX_Data
Return from Interrupt Service Routine
Serial Input Process
1. RX Interrupt is generated and jumped to
Interrupt Service Routine
2. Read ISR
3. Check TX Interrupt Status
4. Read RX FIFO Count
5. Read RX Data
5. Read Data
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
TX Interrupt Service Routine:
…..
RX Interrupt Service Routine:
Read MCR, save in temp2
Set MCR to (temp2 OR 40h)
Read RCR, save in temp3
Set MCR to temp2
If temp1[6] = 1b then
For (Cnt = 0; Cnt <= 255; Cnt++)
Read RBR, save in RX_User_Buffer
Else
For (Cnt = 0; Cnt < temp3; Cnt++)
Read RBR, save in RX_User_Buffer
Return from Interrupt Service Routine