User`s manual
NANO830/831 Intel
®
Atom
TM
D2550/N2600 Processor Nano-ITX Board
Digital I/O 65
mov al,06h
out dx,al
;Programming DI port as input.
mov dx,2Eh
mov al,0E0h
out dx,al
mov dx,2Fh
mov al,Nh
;If N=E0h, DI is programmed as 3 inputs
out dx,al ;(see below
Note1
)
;Read digital input data.
mov dx,2Eh
mov al,0E1h
out dx,al
mov dx,2Fh
in dx,al ;bit5~7 are onboard digital I/O connector pin
;0~2 state (1 High, 0 Low) (see below
Note2
)
;Programming DO port as output.
mov dx,2Eh
mov al,0E4h
out dx,al
mov dx,2Fh
mov al,Xh
;If X=00h, DO is programmed as 5 outputs
out dx,al ;(see below
Note3
)
; Set digital output pins value.
mov dx,2Eh
mov al,0E5h
out dx,al
mov dx,2Fh
mov al,Yh
;set output value Y
out dx,al ;bit0~4 are onboard digital I/O connector pin
;0~4 state (1 High, 0 Low)
;(see below
Note4
)
Note1:
The N has 8 bits. Only bit
s 5,6,7 are programmable.
" 1" means that the bit is programmed to input.
" 0" means that the bit is programmed to output.
Ex:
N=
E0h=11100000b
Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
DI2
as input
DI1
as input
DI0
as input
No use No use No use No use No use
Note2:
1. When DI0~2 are connected to external device, the device sets DI0~2 to high
Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
DI2 = 1 DI1 = 1 DI0 = 1
No use No use No use No use No use
2. When DI0~2 are connected to external device, the device sets DI0 to low and DI1~2 to high
Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
DI2 = 1 DI1 = 1 DI0 = 0
No use No use No use No use No use