
C165H
External Bus Interface
Data Sheet
195
2001-04-19
PRELMNARY
case it must access the shared external resources. This glue logic is required if the
other“ bus master does not automatically remove its hold request after having used the
shared resources.
When two C165Hs are to be connected in this way the external glue logic can be left out.
In this case one of the controllers must be operated in its Master Mode (default after
reset, DP6.7=’0’) while the other one must be operated in its Slave Mode (selected with
DP6.7=’1’).
-EXCERPT-
This bus arbitration allows an external master to request the C165H’s bus via the HOLD
input. The C165H acknowledges this request via the HLDA output and will float its bus
lines in this case. The CS outputs provide internal pullup devices. The new master may
now access the peripheral devices or memory banks via the same interface lines as the
C165H. During this time the C165H can keep on executing, as long as it does not need
access to the external bus. All actions that just require internal resources like instruction
or data memory and on-chip peripherals, may be executed in parallel.
When the C165H needs access to its external bus while it is occupied by another bus
master, it demands it via the BREQ output.
The external bus arbitration is enabled by setting bit HLDEN in register PSW to ‘1’. In
this case the three bus arbitration pins HOLD, HLDA and BREQ are automatically
controlled by the EBC independent of their I/O configuration. Bit HLDEN may be cleared
during the execution of program sequences, where the external resources are required
but cannot be shared with other bus masters. In this case the C165H will not answer to
HOLD requests from other external masters. If HLDEN is cleared while the C165H is in
Hold State (code execution from internal RAM) this Hold State is left only after HOLD has
been deactivated again. Ie. in this case the current Hold State continues and only the
next HOLD request is not answered.
Connecting eg. two C165Hs in this way would require additional logic to combine the
respective output signals HLDA and BREQ. This can be avoided by switching one of the
controllers into Slave Mode where pin HLDA is switched to input. This allows to directly
connect the slave controller to another master controller without glue logic. The Slave
Mode is selected by setting bit DP6.7 to ’1’. DP6.7=’0’ (default after reset) selects the
Master Mode.
Note:
The pins HOLD, HLDA and BREQ keep their alternate function (bus arbitration)
even after the arbitration mechanism has been switched off by clearing HLDEN.
All three pins are used for bus arbitration after bit HLDEN was set once.
Connecting Bus Masters
When multiple C165Hs or a C165H and another bus master shall share external
resources some glue logic is required that defines the currently active bus master and