z8f0813 ZiLOG Semiconductor, z8f0813 Datasheet - Page 108

no-image

z8f0813

Manufacturer Part Number
z8f0813
Description
High-performance 8-bit Microcontrollers
Manufacturer
ZiLOG Semiconductor
Datasheet
PS024314-0308
Receiving Data using the Interrupt-Driven Method
The UART Receiver interrupt indicates the availability of new data (as well as error
conditions). Follow the steps below to configure the UART receiver for interrupt-driven
operation:
1. Write to the UART Baud Rate High and Low Byte registers to set the acceptable baud
2. Enable the UART pin functions by configuring the associated GPIO port pins for
3. Execute a
4. Write to the Interrupt control registers to enable the UART Receiver interrupt and set
5. Clear the UART Receiver interrupt in the applicable Interrupt Request register.
6. Write to the UART Control 1 Register to enable Multiprocessor (9-bit) mode
7. Write the device address to the Address Compare Register (automatic
8. Write to the UART Control 0 register to:
9. Execute an
The UART is now configured for interrupt-driven data reception. When the UART
Receiver interrupt is detected, the associated interrupt service routine (ISR) performs the
following:
1. Checks the UART Status 0 register to determine the source of the interrupt - error,
2. Reads the data from the UART Receive Data register if the interrupt was because of
rate.
alternate function operation.
the acceptable priority.
functions, if appropriate.
MULTIPROCESSOR modes only).
break, or received data.
data available. If operating in MULTIPROCESSOR (9-bit) mode, further actions may
be required depending on the MULTIPROCESSOR mode bits MPMD[1:0].
Set the Multiprocessor Mode Select (MPEN) to Enable MULTIPROCESSOR
mode
Set the Multiprocessor Mode Bits,
matching scheme
Configure the UART to interrupt on received data and errors or errors only
(interrupt on errors only is unlikely to be useful for Z8 Encore! XP devices
without a DMA block)
Set the receive enable bit (REN) to enable the UART for data reception
Enable parity, if appropriate and if multiprocessor mode is not enabled, and select
either even or odd parity
DI
EI
instruction to disable interrupts.
instruction to enable interrupts.
MPMD[1:0]
Universal Asynchronous Receiver/Transmitter
, to select the acceptable address
Z8 Encore! XP
Product Specification
®
F0823 Series
98

Related parts for z8f0813