68013A (128 pin) and USART0 Rx&TX Interrupts | Cypress Semiconductor
68013A (128 pin) and USART0 Rx&TX Interrupts
I'm using this uC to control a RS232 port. I enabled the interrupt
and I can read a received payload of 3 bytes by a vendor command and an interrupt routine.
I have problem when I try to write because I suppose the interrupt routine is triggered, something goes wrong and the
uC won't answer. Could you help me?
How do I manage the writing operation skipping the interrupt?
This in the TD_Init:
CPUCS = ((CPUCS & ~bmCLKSPD) | bmCLKSPD1) ; //Setting up the clock frequency
T2CON = 0x34 ;
RCAP2H = 0xFF ;
RCAP2L = 0xD9;
SCON0 = 0x5A ;
The interrupt routine:
#include "fx2sdly.h" // SYNCDELAY macro
extern BYTE Cont;
extern BYTE rbuf;
void IRS_USART0(void) interrupt 4
if (RI != 0)
RI = 0;
while (TI == 0) ;
TI = 0 ;
SBUF0 = ch ;