CO
-
100/P2102
Series | User Manual
86
5.1.1.4 Sample Code in C Language
5.1.1.4.1 Control of GP70 to GP77
#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, (ReadByte(DataPort) ǀ 0x00))
// 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)
Содержание CO-100/P2102 Series
Страница 11: ...CO 100 P2102 Series User Manual 11 Chapter 1 Product Introductions ...
Страница 18: ...CO 100 P2102 Series User Manual 18 Dimension CO W121C P2102 Unit mm CO W121C P2102E Unit mm ...
Страница 22: ...CO 100 P2102 Series User Manual 22 Chapter 2 Switches Connectors ...
Страница 23: ...CO 100 P2102 Series User Manual 23 2 1 Location of Switches and Connectors 2 1 1 Top View 2 1 2 Bottom View ...
Страница 32: ...CO 100 P2102 Series User Manual 32 Chapter 3 System Setup ...
Страница 52: ...CO 100 P2102 Series User Manual 52 7 Put back the cover and fasten the two screws ...
Страница 63: ...CO 100 P2102 Series User Manual 63 Chapter 4 BIOS Setup ...
Страница 82: ...CO 100 P2102 Series User Manual 82 Chapter 5 Product Application ...
Страница 85: ...CO 100 P2102 Series User Manual 85 ...
Страница 92: ...CO 100 P2102 Series User Manual 92 Reference Input Circuit Reference Output Circuit ...
Страница 93: ...CO 100 P2102 Series User Manual 93 Chapter 6 Optional Modules and Accessories Pin Definitions and Settings ...
Страница 99: ...CO 100 P2102 Series User Manual 99 2 Fasten the VESA mount screws to complete the VESA mounting ...