Reputation: 131
i am trying to setup an UART interrupt to trigger when a character is entered on the UART screen. The thing is the way i have set it up it seems that the interrupt triggers when transmitting and receiving. I have read the data sheet and it doesnt really say if it can be done and how. Its just says that a interrupt for serial port is avaiable. This is how i have set up the uart
S0CON = 0x50;
PCON |= 0x80; /* Double Baud rate */
ADCON0 |= 0x80; /* Use baudrate generator */
S0RELL = 0xCC; /* Baudrate = 9614 Baud @ 16Mhz */
S0RELH = 0x03;
TI0 = 1; /* Ready to transmit */
ES0 =1;
Does anyone possibly have any idea how this can be accomplished?? I am using Keil compiler and the Infineon C509 Datasheet **link fixed
Thank you
Upvotes: 0
Views: 2582
Reputation: 1215
Unfortunately, it doesn't look like you'll be able to do what you want cleanly. Taking a look at the user manual--the data sheet is typically insufficient for this type of problem--check out Figure 7.4. The send and receive interrupt flags set by hardware for channel 0, TI0 and RI0, both trigger the default serial communication interrupt, and it doesn't appear that either can be disabled.
There might be other options, but I'd consider one of the following:
Link to C509-L user manual (not sure how long it'll persist): Infineon product site
Upvotes: 1