CS
-
100/
P1000 Series | User Manual
109
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.
Summary of Contents for CS-100/P1000 Series
Page 12: ...CS 100 P1000 Series User Manual 12 Chapter 1 Product Introductions ...
Page 18: ...CS 100 P1000 Series User Manual 18 Dimension CS 108C P1001 Unit mm ...
Page 19: ...CS 100 P1000 Series User Manual 19 CS 108C P1001E Unit mm ...
Page 23: ...CS 100 P1000 Series User Manual 23 Dimension CS 110HC P1001 Unit mm ...
Page 24: ...CS 100 P1000 Series User Manual 24 CS 110HC P1001E Unit mm ...
Page 28: ...CS 100 P1000 Series User Manual 28 Dimension CS 112HC P1001 Unit mm ...
Page 29: ...CS 100 P1000 Series User Manual 29 CS 112HC P1001E Unit mm ...
Page 33: ...CS 100 P1000 Series User Manual 33 Dimension CS 115C P1001 Unit mm ...
Page 34: ...CS 100 P1000 Series User Manual 34 CS 115C P1001E Unit mm ...
Page 38: ...CS 100 P1000 Series User Manual 38 Dimension CS 117C P1001 Unit mm ...
Page 39: ...CS 100 P1000 Series User Manual 39 CS 117C P1001E Unit mm ...
Page 43: ...CS 100 P1000 Series User Manual 43 Dimension CS 119C P1001 Unit mm ...
Page 44: ...CS 100 P1000 Series User Manual 44 CS 119C P1001E Unit mm ...
Page 48: ...CS 100 P1000 Series User Manual 48 Dimension CS W121C P1001 Unit mm CS W121C P1001E Unit mm ...
Page 52: ...CS 100 P1000 Series User Manual 52 Dimension CS W124C P1001 Unit mm CS W124C P1001E Unit mm ...
Page 58: ...CS 100 P1000 Series User Manual 58 Chapter 2 Jumpers Switches Connectors ...
Page 60: ...CS 100 P1000 Series User Manual 60 2 2 2 Bottom View ...
Page 69: ...CS 100 P1000 Series User Manual 69 Chapter 3 System Setup ...
Page 85: ...CS 100 P1000 Series User Manual 85 ...
Page 87: ...CS 100 P1000 Series User Manual 87 Chapter 4 BIOS Setup ...
Page 106: ...CS 100 P1000 Series User Manual 106 Chapter 5 Product Application ...