Advantech ITA-3630 Series User Manual page 68

Intel gen2/gen3 coretm i7/i5/i3 fanless dual core compact industrial computer with wide voltage input
Table of Contents

Advertisement

data &= 0xfe;//bit 0 is set as 0
smbus_write_byte(0x40, 0x03, data)//Write back. GPIO 00 is set for output
data = smbus_read_byte(0x40, 0x01)//Read slave 0x40 register 1
data |= 0x01;//bit 0 is set as 1 which stands for high
smbus_write_byte(0x40, 0x01, data)//Write back. Output high value
Read Input Value from GPIO 07:
data = smbus_read_byte(0x40, 0x03);//Read slave 0x40 register 3 byte
data |= 0x80;//bit 7??1
smbus_write_byte(0x40, 0x03, data)//Write back. GPIO 07 is set for input
data = smbus_read_byte(0x40, 0x00)//Read slave 0x40 register 0. Then,
the response value of bit 7 should know whether the input is low or high
ITA-3630 User Manual
58

Advertisement

Table of Contents
loading

Table of Contents