I use SC16C554IB80 for our product. I set register as it follows:
Write_SC16( SC16_REG_MCR, 0x08, ch);
Write_SC16( SC16_REG_IER, 0x07, ch);
Write_SC16( SC16_REG_FCR, 0x07, ch);
Write_SC16( SC16_REG_FCR, 0x01, ch);
and incoming data is processed it follows:
while(Read_SC16(SC16_REG_LSR, 0)&0x01) // check received data of port a
unsigned char temp = Read_SC16(SC16_REG_RHR, 0);
And then there is TX echo.
I want to get rid of TX echo but I can't.