P1100 Series | User Manual
68
5.1.1.4 Sample Code in C Language
5.1.1.4.1 Control of GP74 to GP77 (DI1 ~ DI4)
#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
<Input Mode Selection>
// Set GP74 to GP77 input Mode
WriteByte(AddrPort, 0x80)
// Select configuration register 80h
WriteByte(DataPort, 0x0X)
// Set (bit 4~7) = 0 to select GP 74~77 as Input mode.
<Input Value>
WriteByte(AddrPort, 0x82)
// Select configuration register 82h
ReadByte(DataPort, Value)
// Read bit 4~7 (0xFF)= GP74 ~77 as High.
<Leave the Extended Function Mode>
WriteByte(AddrPort, 0xAA)
Содержание P1100 Series
Страница 12: ...P1100 Series User Manual 12 Chapter 1 Product Introductions ...
Страница 19: ...P1100 Series User Manual 19 Chapter 2 Switches Connectors ...
Страница 20: ...P1100 Series User Manual 20 2 1 Location of Switches and Connectors 2 1 1 Top View ...
Страница 21: ...P1100 Series User Manual 21 2 1 2 Bottom View ...
Страница 29: ...P1100 Series User Manual 29 Chapter 3 System Setup ...
Страница 35: ...P1100 Series User Manual 35 3 5 Installing CPU Thermal Pad 1 Place the thermal pad on the CPU heatsink ...
Страница 47: ...P1100 Series User Manual 47 Chapter 4 BIOS Setup ...
Страница 65: ...P1100 Series User Manual 65 Chapter 5 Product Application ...
Страница 73: ...P1100 Series User Manual 73 ...
Страница 74: ...P1100 Series User Manual 74 Chapter 6 Optional Modules and Accessories Pin Definitions and Settings ...