CAPA311/312 3.5
” Board
Digital I/O
69
Appendix B
Digital I/O
B.1 About Digital I/O
The onboard GPIO or digital I/O has 8 bits (DIO1~8). 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.
CN6
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
DI1
2
DO8
3
DI2
4
DO7
5
DI3
6
DO6
7
DI4
8
DO5
9
+5V
10
GND
Summary of Contents for CAPA311
Page 6: ...vi This page is intentionally left blank...
Page 10: ...CAPA311 312 3 5 Board 4 Introduction This page is intentionally left blank...
Page 12: ...CAPA311 312 3 5 Board 6 Board and Pin Assignments Bottom View Side View...
Page 13: ...CAPA311 312 3 5 Board Board and Pin Assignments 7 2 2 Board Layout Top View Side View...
Page 14: ...CAPA311 312 3 5 Board 8 Board and Pin Assignments Bottom View...
Page 32: ...CAPA311 312 3 5 Board 26 Hardware Description 3 4 I O Port Address Map...
Page 34: ...CAPA311 312 3 5 Board 28 Hardware Description...
Page 35: ...CAPA311 312 3 5 Board Hardware Description 29...
Page 36: ...CAPA311 312 3 5 Board 30 Hardware Description...
Page 37: ...CAPA311 312 3 5 Board Hardware Description 31...
Page 38: ...CAPA311 312 3 5 Board 32 Hardware Description...
Page 39: ...CAPA311 312 3 5 Board Hardware Description 33...
Page 74: ...CAPA311 312 3 5 Board 68 Watchdog Timer This page is intentionally left blank...
Page 76: ...CAPA311 312 3 5 Board 70 Digital I O This page is intentionally left blank...