AR-B1665 User’s Guide
Users could test GPIO function under ‘Debug’ program as follow:
GPO Example
:
o 4e 87
;Extended Functions Enable Register
o 4e 87
;Extended Functions Enable Register
o 4e 29
;select CR29
o 4f 80
;(Define the PINs as GPIO or Game Port 1)
"80" Pin121 ~ 128 set as GPIO
o 4e 07
;EFIR=EFER (Extended Functions Index Register)
point to Logical Device Number Reg.
o 4f 07
;EFDR=EFIR+1 (select logical device 7,GPIO in logical device 7 )
o 4e 30
;select CR30 (Active or inactive)
o 4f 01
;set 01 (Active)
,
00 (inactive)
o 4e f0
;select CRF0 (Set the PINs be GPO or GPI Function)
o 4f 00
;set the PINs be GPO
o 4e f2
;select CRF2 (Output High / Low)
o 4f
00
;set the PINs be all Low Level
(FF=all High Level)
o 4e f1
;select CRF1
o 4f 07
;set the output to be 07
o 4e aa
;exit EFER
q
;Quit debug
GPI Example
:
o 4e 87
;Extended Functions Enable Register
o 4e 87
;Extended Functions Enable Register
o 4e 29
;select CR29
o 4f 80
;(Define the PINs as GPIO or Game Port 1)
"80" Pin121 ~ 128 set as GPIO
o 4e 07
;EFIR=EFER (Extended Functions Index Register)
point to Logical Device Number Reg.
o 4f 07
;EFDR=EFIR+1 (select logical device 7,GPIO in logical device 7 )
o 4e 30
;select CR30 (Active or inactive)
o 4f 01
;set 01 (Active)
,
00 (inactive)
o 4e f0
;select CRF0 (Set the PINs be GPO or GPI Function)
o 4f ff
;set the PINs be GPI
o 4e f1
;select CRF1 (Set the PINs be Read only)
i 4f
;Show the PINs Value
q
;Quit
debug
15