User`s manual

SBC84833 Series All-In-One Capa Board User’s Manual
Digital I/O
74
in dx, al ;Bit0 ~ Bit2 are DIO0~2 state. (1 High, 0 Low, Note2)
Digital Output
; Set DIO digital output pins’ value.
mov dx,2Eh
mov al,0E1h
out dx,al
mov dx,2Fh
mov al,M ;If N’s value is 07h, Bit3 ~ Bit7 represent DIO3 ~ DIO7,
out dx,al ;Set output value M
;Bit 3 ~ Bit 7 are DIO Pin 3~7 state. (1 High , 0 Low)
;When M is FF, all DIO pins are high.(
Note3)
Note1:
The N has 8bits. Every bit’s value is either “1” or “0”.
" 1" means that the bit is programmed to input.
" 0" means that the bit is programmed to output.
Ex:
1. N=00h=00000000b
DIO7 DIO6 DIO5 DIO4 DIO3 DIO2 DIO1 DIO0
Output Output Output Output Output Output Output Output
2. N=02h=00000010b.
DIO7 DIO6 DIO5 DIO4 DIO3 DIO2 DIO1 DIO0
Output Output Output Output Output Output Input Output
3. N=07h=00000111b.
DIO7 DIO6 DIO5 DIO4 DIO3 DIO2 DIO1 DIO0
Output Output Output Output Output Input Input Input
4. N=F2h=11110010b.
DIO7 DIO6 DIO5 DIO4 DIO3 DIO2 DIO1 DIO0
Input Input Input Input Output Output Input Output
Note2:
IF N=07h.
DIO7 DIO6 DIO5 DIO4 DIO3 DIO2 DIO1 DIO0
Output Output Output Output Output Input Intput Intput