Digilent DIO4 User Manual
Page 3
DIO4 Reference Manual
Digilent, Inc.
www.digilentinc.com
Page
3
Discrete LEDs
Eight individual LEDs are provided for circuit
outputs. The LED cathodes are tied to GND via
270-ohm resistors, and the LED anodes are
driven from a 74HC373. The ‘373 allows LED
data to be latched on the DIO4, so that the
LD# signals from the system board do not
need to be driven continuously (the LD#
signals use connector pins that are used in the
“system bus” on some Digilent boards). If the
system bus is not needed, then the LDG signal
can be tied high.
74HC373
LD #
GND
GND
270
Ohm
4.7K
D
Q
G
LDG
GND
4.7K
Button Inputs
The DIO4 contains 4 N.O. (normally open)
pushbuttons. Button outputs are connected to
Vdd via a 4.7K resistor. When the button is
pressed, the output is connected directly to
GND. This results in a logic signal that is low
only while the button is actively pressed, and
high at all other times. The buttons are
debounced with an RC filter and Schmidt-
trigger inverter as shown in the figure below.
This circuit creates a logic high signal when the
button is pressed. The debounce circuit
provides ESD protection and creates a signal
with clean edges, so the BTN# signals can be
used as clock signals if desired.
4.7K
Vdd
4.7K
BTN#
.1uF
Switch Inputs
The eight slide switches on the DIO4 can be
used to generate logic high or logic low inputs to
the attached system board. The switches exhibit
about 2ms of bounce, and no active debouncing
circuit is employed. A 4.7K-ohm series resistor is
used for nominal input protection.
PS2 Port
The DIO4 board includes a 6-pin mini-DIN
connector that can accommodate a PS2 mouse
or PS2 keyboard connection. A 5VDC regulator
and voltage-mapping buffers are provided on the
board to interface lower voltage system boards
with keyboards and/or mice.
PS2 Connector
Pin 1
Pin 5
Pin 6
Bottom-up
hole pattern
Pin Definitions
Pin Function
1 Data
2 Reserved
3 GND
4 Vdd
5 Clock
6 Reserved
1
5
3
2
4
6
Pin 2
Both the mouse and keyboard use a two-wire
serial bus (including clock and data) to
communicate with a host device, and both drive
the bus with identical signal timings. Both use
11-bit words that include a start, stop and odd
parity bit, but the data packets are organized
differently, and the keyboard interface allows bi-
directional data transfers (so the host device can
illuminate state LEDs on the keyboard). Bus
timings are shown below. The clock and data
signals are only driven when data transfers
occur, and otherwise they are held in the “idle”
state at logic ‘1’. The timings define signal
requirements for mouse-to-host communications
and bi-directional keyboard communications.
GND
Vdd
SW#
signal
4.7K
Ω