SB16C1058PCI_Data Sheet_EN
SB16C1058PCI
PCI Target Interface Controller
with Octal-UART
JULY 2013 REV 1.04
68
Table 14-2: SB16C1058PCI 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, then save in temp2
Set MCR to (temp2 OR 40h)
Read TCR, then 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