English
Language : 

PAK-IV Datasheet, PDF (6/14 Pages) List of Unclassifed Manufacturers – Using the PAK-IV I/O Coprocessor
I/O Considerations
Each I/O pin on the Pak IV can sink 25mA or source 20mA subject to a total limit of
150mA total sink and 100mA total source. Inputs consider voltages below .8V as a 0 and
voltages greater than 2.4V as a 1. Outputs will be less than .6V or greater than 4.3V (for a
1 or a 0, respectively).
The PAK IV's I/O pins are divided into two groups of 8, BANK A and BANK B. By
default, the unit starts with BANK A active. You can switch to either bank by issuing a
BANKSEL command.
Resetting
There are several ways you can reset the Pak IV. It is a good idea to reset the unit before
using it, or any time that you want to make sure it is in a known state. This is especially
true when using the Stamp. Each time the Stamp resets or wakes up from sleep, the I/O
pins briefly become inputs. This can fool the Pak IV into starting a data transfer. Always
reset the Pak IV first.
The best way to reset the Pak IV (when using only one unit) is to send a special reset
sequence over the clock and data lines. This has the advantage that it doesn't require any
extra I/O from the host. To send a reset sequence, bring the data pin to 0 and raise the
clock to a 1. While the clock remains in the 1 state, bring the data pin high. This will
indicate to the Pak IV that you wish to reset. When the clock returns to a zero state, the
Pak IV will reset. The reset doesn't change any register values or port pins, but it does
reset communications to a known state. Reset in this way does not affect the currently
selected I/O bank, either.
You can get the same result by bringing the enable pin low and then returning it to high
to enable the Pak IV. This is useful if you are connecting more than one Pak to the same
data and clock lines. You'll need to use the enable pin then anyway, and it makes sure
that the selected Pak is always in a known state. Don't use the data line reset when using
multiple Paks on the same clock and data lines.
Finally, you can force a hardware reset by bringing the reset pin low. This might be
useful if your circuit generates a hardware reset signal based on a brown-out detector or
other master reset circuit. Normally, you'll just connect the reset pin to the +5V supply
and allow the Pak IV to reset itself on power up. If you do want to drive this pin, make
sure that it is at 5V for normal operation. You can use a reset switch or other device if
you pull up the reset pin with a 10K-22K resistor. This is the only reset that will interrupt
an operation in progress.
Communications
There are several schemes you can use to communicate with the Pak IV. All of them
revolve around a synchronous protocol involving a clock pin and 1 or 2 data pins. Data is
shifted most significant bit first, and samples at the rising edge of the clock. The Pak IV
exposes a separate input (SIN) and output (SOUT) pins for hosts that can't easily handle