Interrupt driven UART
- From: "goister@xxxxxxxxx" <goister@xxxxxxxxx>
- Date: 11 Oct 2006 20:11:18 -0700
Hi,
I'm working with a Toshiba TMP91 series MCU that doesn't seem to have
any UART control/status bits to check for empty data register, rx/tx
ready, etc, but does have interrupt vectors for serial tx and rx, which
is why I think I have to use interrupt driven UART rather than polling
it.
I have functions that expect to receive and send a single byte by
calling receivebyte and sendbyte functions. However, since it's
interrupt based, receivebyte seems to be pretty redundant. What I have
now is a UART receive ISR that first does error checking, then copies
the rx buffer to a global rx byte variable, and setting a global
rx_ready flag to 1. Then my receivebyte function does nothing until the
rx ready flag is set, after which it just clears it. Does this make
sense?
.
- Follow-Ups:
- Re: Interrupt driven UART
- From: Ico
- Re: Interrupt driven UART
- Prev by Date: Embedded UI Libraries/Frameworks/Generators
- Next by Date: Re: Quickie ZigBee Application Kit from Rabbit!
- Previous by thread: Embedded UI Libraries/Frameworks/Generators
- Next by thread: Re: Interrupt driven UART
- Index(es):
Relevant Pages
|