beautypg.com

Appendix i: gpio port, Programming the gpio port, Reading the gpio data – Fairbanks FB3000 II Operators Manual User Manual

Page 46

background image

02/10

46

51220 Rev. 1

Appendix I: GPIO Port

Programming the GPIO Port

The FB3000 II provides an 8-bit GPI port and an 8-bit GPO port that you can use to
read and write data through.

Reading the GPIO Data

• 2e,87

• 2e,87

• 2e,2a //configuration register(CR2a)

• 2f,fc //set GPIO ,not GAME PORT

• 2e,07 //point to logical device number reg

• 2f,07 //select logical device 7

• 2e,30 //configuration register(CR30)

• 2f,1 //open logical device control

• 2e,f0 //configuration register(CRf0)

• 2f,FF // 1=input

• 2e,f1

• I 2f // read value (00 ~ FF)