SERIES AP470 ACROPACK
USER
’S MANUAL
Acromag, Inc. Tel: 248-295-0310
- 25 -
http://www.acromag.com
- 25 -
www.acromag.com
Write Mask Register & Enhanced Mode Select Register (Standard Mode Port 7, Read/Write)
(BAR0 + 0x0000 0024)
This register is used to mask the ability to write data to the six I/O ports of
this model. Writing a ‘1’ to bits 0-5 of the Mask Register will mask ports 0-5
respectively, from inadvertent writes. A read of this register will return the
status of the mask in bits 0-5.
Table 3.9 Standard Mode
Write Mask Register (Port 7)
BIT
WRITE TO REGISTER
READ FROM REGISTER
0
Port 0 Write Mask
Port 0 Write Mask
1
Port 1 Write Mask
Port 1 Write Mask
2
Port 2 Write Mask
Port 2 Write Mask
3
Port 3 Write Mask
Port 3 Write Mask
4
Port 4 Write Mask
Port 4 Write Mask
5
Port 5 Write Mask
Port 5 Write Mask
6
NOT USED
NOT USED
7
NOT USED
NOT USED
Bits 6 & 7 of this register are not used. On power-up reset, all bits are set to
‘0’, allowing writes to the output ports.
This register is also used to select the Enhanced Mode of operation. To
switch to Enhanced Mode, four unique bytes must be written to port 7, in
consecutive order, without doing any reads or writes to any other port and
with interrupts disabled. The data pattern to be written is 07H, 0DH, 06H,
and 12H, in order, and this must be written immediately after reset or
power-up.
Port Registers (Enhanced Mode Bank 0, Ports 0-5, Read/Write)
(BAR0 + 0x0000 0008 –
0x0000 001C)
Six registers are provided to control/monitor 48 possible I/O points. Data is
read from or written to one of six groups of eight I/O lines (Ports 0-5), as
designated by the address and read and write signals. A read of this register
returns the status (ON/OFF) of the I/O point. A write to this register controls
the state of the open-drain output (low level true). The Mask Register is
used to disable writes to I/O ports designated as input ports. That is, when a
port (group of 8 I/O lines) is used as an input port, writes to this port must
be blocked (masked) to prevent contention between the output circuitry
and any external device driving this input line.
Outputs are configured as open-drain with pull-ups installed. Thus, on
power-up or reset, the port registers are reset to 0, forcing the outputs to
be set high (OFF).