MOTOROLA
M68000 8-/16-/32-BIT MICROPROCESSORS USER'S MANUAL
4-5
The descriptions of the eight states of a write cycle are as follows:
STATE 0
The write cycle starts in S0. The processor places valid function codes on
FC2–FC0 and drives R/
W
high (if a preceding write cycle has left R/
W
low).
STATE 1
Entering S1, the processor drives a valid address on the address bus.
STATE 2
On the rising edge of S2, the processor asserts
AS
and drives R/
W
low.
STATE 3
During S3, the data bus is driven out of the high-impedance state as the
data to be written is placed on the bus.
STATE 4
At the rising edge of S4, the processor asserts
LDS
, or
D S
. The
processor waits for a cycle termination signal (
DTACK
or
BERR
) or
VPA
, an
M6800 peripheral signal. When
VPA
is asserted during S4, the cycle
becomes a peripheral cycle (refer to
Appendix B M6800 Peripheral
Interface
). If neither termination signal is asserted before the falling
edge at the end of S4, the processor inserts wait states (full clock cycles)
until either
DTACK
or
BERR
is asserted.
STATE 5
During S5, no bus signals are altered.
STATE 6
During S6, no bus signals are altered.
STATE 7
On the falling edge of the clock entering S7, the processor negates
AS
,
LDS
, and
DS
. As the clock rises at the end of S7, the processor places
the address and data buses in the high-impedance state, and drives R/
W
high. The device negates
DTACK
or
BERR
at this time.
4.1.3 Read-Modify-Write Cycle.
The read-modify-write cycle performs a read operation, modifies the data in the arithmetic
logic unit, and writes the data back to the same address. The address strobe (
AS
) remains
asserted throughout the entire cycle, making the cycle indivisible. The test and set (TAS)
instruction uses this cycle to provide a signaling capability without deadlock between
processors in a multiprocessing environment. The TAS instruction (the only instruction
that uses the read-modify-write cycle) only operates on bytes. Thus, all read-modify-write
cycles are byte operations. Figure 4-5 and 4-6 illustrate the read-modify-write cycle
operation.