CAPA322 3.5” Board
Digital I/O
57
Appendix B
Digital I/O
B.1 About Digital I/O
The onboard GPIO or digital I/O has 8 bits (DIO0~7). Each bit can be set to function as input or
output by software programming. In default, all pins are pulled high with +5V level (according
to main power). The BIOS default settings are 4 inputs and 4 outputs.
CN7
B.2 Digital I/O Programming
Assembly sample code :
mov
dx,fa18
; Set DIO 0-7 to Output
mov
al,00
out
dx,al
mov
dx,fa19
; Set DIO 4-7 to High
mov
al,f0
out
dx,al
mov
dx,fa18
; Set DIO 0-7 to Input
mov
al,ff
out
dx,al
mov
dx,fa19
; Get DIO 0-7 status
in
al,dx
mov
dx,fa18
; Set DIO 0-4 to Input, 5-7 to Output
mov
al,1f
; al = 1F => 00011111
out
dx,al
mov
dx,fa19
; Set DIO 6 to High
mov
al,40
; al = 40 => 01000000
out
dx,al
in
al,dx
; Get DIO 0-7 status
Pin Signal
Pin
Signal
1
DI0
2
DO7
3
DI1
4
DO6
5
DI2
6
DO5
7
DI3
8
DO4
9
+5V
10
GND
1
10
Summary of Contents for CAPA322
Page 6: ...vi This page is intentionally left blank...
Page 10: ...CAPA322 3 5 Board 4 Introduction This page is intentionally left blank...
Page 12: ...CAPA322 3 5 Board 2 Board and Pin Assignment Bottom View Side View...
Page 13: ...CAPA322 3 5 Board Board and Pin Assignments 3 2 2 Board Layout Top View Side View...
Page 14: ...CAPA322 3 5 Board 4 Board and Pin Assignment Bottom View...
Page 34: ...CAPA322 3 5 Board 24 Board and Pin Assignment This page is intentionally left blank...
Page 36: ...CAPA322 3 5 Board 26 Hardware Description 3 4 I O Port Address Map...
Page 38: ...CAPA322 3 5 Board 28 Hardware Description...
Page 39: ...CAPA322 3 5 Board Hardware Description 29...
Page 40: ...CAPA322 3 5 Board 30 Hardware Description...
Page 41: ...CAPA322 3 5 Board Hardware Description 31...
Page 66: ...CAPA322 3 5 Board 56 Watchdog Timer This page is intentionally left blank...