GP-3000 Series | User Manual
94
5.1.1.4 Sample Code in C Language
5.1.1.4.1 Control of GP70 to GP77 (DI1 ~ DI8)
#define AddrPort 0x4E
#define DataPort 0x4F
<Enter the Extended Function Mode>
WriteByte(AddrPort, 0x87)
WriteByte(AddrPort, 0x87)
// Must write twice to enter Extended mode
<Select Logic Device>
WriteByte(AddrPort, 0x07)
WriteByte(dataPort, 0x06)
// Select logic device 06h
<Output/Input Mode Selection>
// Set GP70 to GP77 input Mode
WriteByte(AddrPort, 0x80)
// Select configuration register 80h
WriteByte(DataPort, 0x0X)
// Set (bit 0~7) = 0 to select GP 70~77 as Input mode.
<Input Value>
WriteByte(AddrPort, 0x82)
// Select configuration register 82h
ReadByte(DataPort, Value)
// Read bit 0~7 (0xFF)= GP70 ~77 as High.
<Leave the Extended Function Mode>
WriteByte(AddrPort, 0xAA)
Summary of Contents for GEB-3301-R10
Page 13: ...GP 3000 Series User Manual 13 Chapter 1 Product Introductions ...
Page 16: ...GP 3000 Series User Manual 16 1 3 Product Pictures GP 3000 ...
Page 17: ...GP 3000 Series User Manual 17 GP 3000 GEB 3301 ...
Page 18: ...GP 3000 Series User Manual 18 GP 3000 GEB 3601 ...
Page 25: ...GP 3000 Series User Manual 25 External Fan Used to be system s external fan ...
Page 26: ...GP 3000 Series User Manual 26 1 7 Mechanical Dimension GP 3000 Unit mm GEB 3301 Unit mm ...
Page 27: ...GP 3000 Series User Manual 27 GEB 3601 Unit mm ...
Page 28: ...GP 3000 Series User Manual 28 Chapter 2 Switches Connectors ...
Page 40: ...GP 3000 Series User Manual 40 Chapter 3 System Setup ...
Page 59: ...GP 3000 Series User Manual 59 7 Fix the cover by fastening the two screws ...
Page 67: ...GP 3000 Series User Manual 67 Chapter 4 BIOS Setup ...
Page 90: ...GP 3000 Series User Manual 90 Chapter 5 Product Application ...
Page 93: ...GP 3000 Series User Manual 93 ...
Page 99: ...GP 3000 Series User Manual 99 Reference Input Circuit Reference Output Circuit ...
Page 113: ...GP 3000 Series User Manual 113 Chapter 6 Optional Modules Accessories ...
Page 121: ...GP 3000 Series User Manual 121 Bottom View ...
Page 147: ...GP 3000 Series User Manual 147 7 Fasten the two screws to fix the module ...