willy Posted January 15, 2019 Report Share Posted January 15, 2019 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. Link to comment Share on other sites More sharing options...
Zerosquare Posted January 18, 2019 Report Share Posted January 18, 2019 They're chip-select lines, they only stay asserted during the duration of the memory access. In other words, you can't set them high or low, you only get a very short pulse when you access memory in the memory area associated with the GPIO pin. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now