D
I/O P
IGITAL
ORT
Digital I/O channels 0-15 are accessed via SPI slave select 6 (writing 6h to the SS field of
SPICONTROL). Channels 16-31 are accessed via SPI chip select 7 (writing 7h to the SS field).
Each pair of I/O ports is configured by a set of paged I/O registers accessible through SPI. These
registers control settings such as signal direction, input polarity, and interrupt source.
I
G
NTERRUPT
ENERATION
The EBX-11 digital I/O can be configured to issue hardware interrupts on the transition (high to
low or low to high) of any digital I/O pin. IRQ assignment is made in SPI control register
SPISTATUS. Note that this IRQ is shared among all SPI devices on-board and externally
connected to the EBX-11. The IRQ is also shared with the PC/104 bus and must be enabled in
CMOS for ISA IRQx. Digital I/O port interrupt configuration is achieved through I/O port
register settings. Please refer to the
The on-board digital I/O chips must be configured for open-drain and mirrored interrupts in order
for any SPI device to use hardware interrupts. The following code example illustrates how to do
this.
MOV
DX, 1D8h
MOV
AL, 26h
OUT
DX, AL
MOV
DX, 1D9h
MOV
AL, 30h
OUT
DX, AL
MOV
DX, 1DBh
EBX-11 Reference manual
Table 28: Digital I/O Connections – Channels 16-31
J10
Pin
Signal
11
Digital I/O 16
12
Digital I/O 17
13
Digital I/O 18
14
Digital I/O 19
15
GND
16
Digital I/O 20
17
Digital I/O 21
18
Digital I/O 22
19
Digital I/O 23
20
GND
21
Digital I/O 24
22
Digital I/O 25
23
Digital I/O 26
24
Digital I/O 27
25
GND
26
Digital I/O 28
27
Digital I/O 29
28
Digital I/O 30
29
Digital I/O 31
30
GND
Note: The CBR-4004 is a multipurpose board. The silkscreen
label does not necessarily indicate pin function.
C
ONFIGURATION
Microchip MCP23S17 datasheet
;SPICONTROL: SPI Mode 00, 24bit, auto DIO_0_SS#
;SPISTATUS: 8MHz, no IRQ, left-shift
CB-4004
CBR-4004
Connector
Pin (Label)*
J3
5 (IO9)
Digital IO
4 (IO10)
3 (IO11)
2 (IO12)
1 (GND2)
J4
5 (IO13)
Digital IO
4 (IO14)
3 (IO15)
2 (IO16)
1 (GND2)
1 (IO17)
J6
2 (IO18)
Digital IO
3 (IO19)
4 (IO20)
5 (GND3/PBRST#)
J7
1 (IO21)
Digital IO
2 (IO22)
3 (IO23)
4 (IO24)
5 (GND3)
for more information.
Interfaces and Connectors
52
Need help?
Do you have a question about the Python EBX-11 and is the answer not in the manual?