English
Language : 

Z80180 Datasheet, PDF (173/326 Pages) Zilog, Inc. – Z8018x Family MPU
Z 8018x Fam ily
M PU Us e r M anual
158
return accurate data without requiring the timer to be stopped. The write
procedure requires the PRT to be stopped.
For reading (without stopping the timer), TMDR is read in the order of
lower byte - higher byte (TMDRnL, TMDRnH). The lower byte read
(TMDRnL) stores the higher byte value in an internal register. The
following higher byte read (TMDRnH) accesses this internal register.
This procedure insures timer data validity by eliminating the problem of
potential 16-bit timer updating between each 8-bit read. Specifically,
reading TMDR in higher byte–lower byte order may result in invalid data.
Note the implications of TMDR higher byte internal storage for
applications which may read only the lower and/or higher bytes. In
normal operation all TMDR read routines must access both the lower and
higher bytes, in that order. For writing, the TMDR down counting must
be inhibited using the TDE (Timer Down Count Enable) bits in the TCR
(Timer Control Register). Then, any or both higher and lower bytes of
TMDR can be freely written (and read) in any order.
CSI/O Transmit/Receive Data Register (TRDR: I/O
Address = 0BH).
TRDR is used for both CSI/O transmission and reception. Thus, the
system design must insure that the constraints of half-duplex operation
are met (Transmit and receive operation cannot occur simultaneously).
For example, if a CSI/O transmission is attempted while the CSI/O is
receiving data, the CSI/O does not work.
TRDR is not buffered. Attempting to perform a CSI/O transmit while the
previous transmit data is still being shifted out causes the shift data to be
immediately updated, thereby corrupting the transmit operation in
progress. Similarly, reading TRDR during a transmit or receive must be
avoided.
UM005001-ZMP0400