System Installation
RUBY-9712VG2A User’s Manual
3-10
3.7.2 Programming
Guide
There are 4 GPIO pins & 4 DO on RUBY-9712VG2A. These GPIO pins are from
SUPER I/O (W83627THF) GPIO pins, and can be programmed as Input or Output
direction.
J23 pin header is for 4 GPIO pins & 4 DO and its pin assignment as following:
J23_Pin1=GPIO1: from SUPER I/O_GP26 with Ext. 4.7K PH
J23_Pin2=GPIO2: from SUPER I/O_GP25 with Ext. 4.7K PH
J23_Pin3=GPIO3: from SUPER I/O_GP24 with Ext. 4.7K PH
J23_Pin4=GPIO4: from SUPER I/O_GP23 with Ext. 4.7K PH
J23_Pin6=DO1: from SUPER I/O_GP10 with Ext. 4.7K PH
J23_Pin7=DO2: from SUPER I/O_GP11 with Ext. 4.7K PH
J23_Pin8=DO3: from SUPER I/O_GP12 with Ext. 4.7K PH
J23_Pin9=DO4: from SUPER I/O_GP13 with Ext. 4.7K PH
<<<<< Be careful Pin5=GND , Pin10=VCC >>>>>
There are several Configuration Registers (CR) of W83627THF needed to be
programmed to control the GPIO direction, and status (GPI)/value (GPO). CR00h ~
CR2F are common (global) registers to all Logical Devices (LD) in W83627THF.
CR07h contains the Logical Device Number that can be changed to access the LD as
needed. LD7 contains the GPIO10~17 registers.
Programming Guide:
Step1: CR2A_Bit [7.2]. P [1,1,1,1,1,1]; to select multiplexed pins as GPIO10~17 pins
Step2: LD7_CR07h.P [07h]; Point to LD7
Step3: LD7_CR30h_Bit0.P1; Enable LD7
Step4: Select GPIO direction, Get Status or output value.
LD7_CRF0h; GPIO17 ~ 10 direction, 1 = input, 0 = output pin
LD7_CRF2h.P [00h]; Let CRF1 (GPIO data port) non-invert to prevent from
confusion
LD7_CRF1h; GPIO17~10 data port, for input pin, get status from the related bit, for
output pin, write value to the related bit.
For example,
LD7_CRF0h_Bit4.P0; Let GPIO14 as output pin
LD7_CRF2h_Bit4.P0; Let CRF1_Bit4 non-inverted
LD7_CRF1h_Bit4.P0; Output “0” to GPIO14 pin (J23_Pin6)
LD7_CRF0h_Bit0.P1; Let GPIO10 as input pin
LD7_CRF2h_Bit0.P0; Let CRF1_Bit0 non-inverted
Read LD7_CRF1h_Bit0; Read the status from GPIO10 pin (J23_Pin1)