
Spectra
GmbH
&
Co.
KG
User
Manual
Spectra
PowerBox 110
Series
Version
1.1
April
2019
69
5.1.1.4 Sample Code in C Language
5.1.1.4 .1
Control
of
GP54
to
GP57
#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(
data
Port, 0x06)
// Select logic device 06h
<Output/Input Mode Selection>
// Set GP54 to GP57 input Mode
WriteByte(AddrPort, 0xA0)
// Select configuration register A0h
Write
Byte(DataPort, (ReadByte(DataPort)
ǀ
0x0X
))
// Set (bit 4~7) = 0 to select GP 54~57 as
Input mode.
<
Input
Value>
WriteByte(AddrPort, 0xA1)
// Select configuration register A1h
Read
Byte(DataPort, Value)
// Read bit 4~7 (0xFx)= GP54 ~57 as High.
<Leave the Extended Function Mode>
WriteByte(AddrPort, 0xAA)
Summary of Contents for Powerbox 110 Series
Page 1: ...SPECTRA POWERBOX 110 SERIES USER MANUAL Version 1 1 April 2019...
Page 10: ...Product Introductions Chapter 1...
Page 17: ...Switches and Connectors Chapter 2...
Page 26: ...System Setup Chapter 3...
Page 46: ...BIOS Setup Chapter 4...
Page 66: ...Product Application For PB 100 DIO Only Chapter 5...
Page 74: ...Optional Module Pin Definitions and Settings Chapter 6...