Hi.
I'am trying to understand HOW EXACTLY GPIO's in jaguar are working.
Let's take first example, eeprom access code developed by Atari. Take look at the last section:
JOY1 equ $f14000 ;this we'll use as our I/O base address
GPIO_0 equ $f14800 ;General purpose I/O #0
GPIO_1 equ $f15000 ;General purpose I/O #1
;
; Equates derived from the above
; to allow indirect with 16-bit displacement addressing
;
GPIO_0of equ GPIO_0-JOY1 ;offset to GPIO_0 (when addr reg Ax -> JOY1)
GPIO_1of equ GPIO_1-JOY1 ;offset to GPIO_1 (when addr reg Ax -> JOY1)
;
; entry:
; a0 -> JOY1
; d2.w = 9-bit command to write
;
out9bits:
rol.w #8,d2 ;align 1st serial data bit (bit8) to bit0
moveq #8,d3 ;send 9
out9lp:
move.w d2,GPIO_0of(a0) ;write next bit
nop
nop
nop ;delay next write
nop
nop
nop
rol.w #1,d2 ;adjust bit0 for next datum
dbra d3,out9lp ;go for all 9 or all 16
rts
this line:
move.w d2,GPIO_0of(a0) ;write next bit
asserts clock signal line (GPIO0) and set D0 data line.
I'm wondering how the Clock signal is deasserted ?
Another example form same code, asserting /CS line (GPIO1):
tst.w GPIO_1of(a0) ;strobe ChipSelect
How it is deasserted ?
Seems like I missed something??
Hope somebody can help with understanding that.
Best Regards
Willy.