You do have the choice, as to whether to use interrupts or not. In fact there are perhaps three ways, but to be sure that each character is dealt with exactly once, there are two:
- read the status register to see if a character has come in, or if there is space for a character to go out
- use the interrupt to tell you when the receive buffer is full, or when the transmit buffer is empty.
These amount to the same thing. In your first simple code, you might find it easier to poll the status register. Ultimately, when you have a sophisticated OS, you will deal with interrupts from various sources, but that's not the place the start.
There's some good information on this page:
http://alanclements.org/serialio.htmlIn particular, note that you do need to set the device up, so it's working in the mode that you intend to use:
Quote:
Control Register
Because the ACIA is a versatile device that can be operated in any of several different modes, the control register permits the programmer to define its operational characteristics. ... in almost all applications the ACIA is normally configured once only.