
System Installation
ROBO-8777VG2A User’s Manual
3-10
There are several Configuration Registers (CR) of W83627DHG 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 W83627DHG.
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].P[0]; to select multiplexed pins as GPIO34 pins
Step2: LD9_CR07h.P [09h]; Point to LD9
Step3: LD9_CR30h_Bit[1.0].P[1.1]; Enable GPIO2&GPIO3
Step4: Select GPIO direction, Get Status or output value.
LD9_CRE3h; GPIO27 ~ 20 direction, 1 = input, 0 = output pin
LD9_CRE5h.P [00]; Let CRE4 (GPIO data port) non-invert to prevent from confusion
LD9_CRE4h; GPIO27~20 data port, for input pin, get status from the related bit, for
output pin, write value to the related bit.
For example,
LD9_CRE3h_Bit0.P0; Let GPIO20 as output pin
LD9_CRE5h_Bit0.P0; Let CRE4_Bit0 non-inverted
LD9_CRE4h_Bit0.P0; Output “0” to GPIO20 pin (J46_Pin2)
LD9_CRF0h_Bit4.P1; Let GPIO34 as input pin
LD9_CRF2h_Bit4.P0; Let CRF1_Bit4 non-inverted
Read LD9_CRF1h_Bit4; Read the status from GPIO34 pin (J46_Pin1)
How to access W83627DHG CR?
In ROBO-8777VG2A, the EFER = 002Eh, and EFDR = 002Fh.
EFER and EFDR are 2 IO ports needed to access W83627HF CR.
EFER is the Index Port, EFDR is the Data Port.
CR index number needs to be written into EFER first,
Then the data will be read/written from/to EFDR.
To R/W W83627DHG CR, it is needed to Enter/Enable Configuration Mode first.
When completing the programming, it is suggested to Exit/Disable Configuration
Mode.
Enter Configuration Mode: Write 87h to IO port EFER twice.
Exit Configuration Mode: Write AAh to IO port EFER.