19 I/O lines configurable for pulled low / pulled high
Five I/O lines are always pulled low. These lines are port A bits 0, 1 and 2, and port
C bits 2 and 3. The other 19 bits can be pulled low or pulled high using jumper
block W1. This allows a known state upon powerup. +5V is used to pull the lines
high, and 10K ohm resistor networks are used to configure the I/O lines as low. See
page 18 for the location of W1.
Table 8–4
Digital I/O pulled high / pulled low jumper
Jumper block W1
Pins jumpered
Configuration of 19 I/O lines
[1:2] Pulled
high
[2:3]* Pulled
low
* default
Configuring and programming the I/O port
The I/O chip has three ports with eight parallel I/O lines (bits) per port. All lines
can be programmed as all inputs, all outputs or individually as inputs or outputs.
You can alter which bits are inputs or outputs by writing a control command to the
control register of the I/O bank. When a line is configured as an output, it can sink
a maximum of
15
mA at 0.4V or can source
15
mA at 2.4V. On powerup and
software or hardware reset, all digital I/O lines are reset as inputs.
Programming the I/O
Follow these steps to program the I/O chip:
1. Configure the I/O port bit directions, either as inputs or outputs.
2. Write to port A, B, or C with the desired level or read the bit level from the
desired port.
Configuring the I/O
Follow these steps to configure the I/O chip.
Note
In the following examples, “base” for I/O always refers to the base address as
1050h.
1. Write a “2” to the control register (base a 3). This places the I/O chip in
“direction” mode: (base address = 1050h)
OUT 1053h, 2 (control register, direction mode)
2. Set the direction of each bit. A “0” written to the corresponding line indicates
an input and a “1” bit indicates an output. Each bit corresponds to the
equivalent I/O line.
67
Содержание 5266
Страница 18: ...Figure 2 1 5266 component diagram top 18 ...
Страница 19: ...Figure 2 2 5266 component diagram bottom 19 ...
Страница 20: ...Figure 2 3 5266 dimensions inches 20 ...
Страница 21: ...Figure 2 4 5266 dimensions mm 21 ...