Digital I/O Sample Program - Aaeon PFM-CVS Manual

Pc/104 module
Hide thumbs Also See for PFM-CVS:
Table of Contents

Advertisement

P C / 1 0 4 M o d u l e
D.4 Digital I/O Sample Program
Main(){
aaeonSuperIOOpen();
f81866SetLdn(0x06);
Register
If(Set Digital Output High/Low?){
// Program GPIO pin to Output pin
// Example :
// GPIO8x GPIOOutputEnableRegister = 0x88
// GPIO7x GPIOOutputEnableRegister = 0x80
// 1: Set to Output Pin
// 0x0F : GPIOx0~GPIOx3 as Output Pin
f81866WriteByte(GPIOOutputEnableRegister, 0x0F);
// Set GPIO Output High/Low
// Example :
// GPIO8x GPIOOutputDataRegister = 0x89
// GPIO7x GPIOOutputDataRegister = 0x81
// 1: Output Hight, 0: Output Low
// 0x0F : GPIOx0~GPIOx3 output High
f81866WriteByte(GPIOOutputDataRegister, 0x0F);
Appendix D Electrical Specifications for I/O Ports
P F M - C V S
// LDN6 is GPIO Configuration
D-6

Advertisement

Table of Contents
loading

Table of Contents