GP-3000 Series | User Manual
107
5.3.1.4 Sample Code in C Language
5.3.1.4.1 Control of GPIO50 to GPIO57 (LED1~ LED8)
#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 GPIO 50~57 to output mode
WriteByte(AddrPort, 0xA0)
// Select configuration register A0h
WriteByte(DataPort, 0xFF)
// Set (bit 0~7) = 1 to select GPIO 50~57 as output
mode.
<Output Value>
WriteByte(AddrPort, 0xA1)
// Select configuration register A1h
Value = 0xXX
// Set Value with range 00h~FFh
WriteByte(DataPort, Value)
// Set bit 0~7=(0/1) to output GPIO 50~57 as Low or
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 ...