#5615 - f00l - Sat May 03, 2003 12:46 pm
Hi ,
I'm just a newbie trying to use the linkcable in goldroad ASM,
this is what I have so far :
This is what I want to do :
Recommended Communication Procedure for MASTER unit (internal clock)
- Initialize data which is to be sent to slave (placed in REG_SCCNT_H for 8-bit mode or REG_SCD0 for 32-bit mode)
- Wait for SI to become LOW (slave ready). (Check timeout here!)
- Set Start flag.
- Wait for IRQ (or for Start bit to become zero).
- Process received data (received in REG_SCCNT_H for 8-bit mode or REG_SCD0 for 32-bit mode)
And this is my code, can somebody tell me if it works and if not, how I can get it to work...
ldr r2,=0x40012A ; REG_SCCNT_H
ldr r1,=0xFF
strb r1,[r2]
ldr r3,=0x4000128 ; REG_SCCNT_L
ldr r0,=0x00
SUBS r3,r0 ; Wait until r3 is 0
ldrbZ r3,[r2] ; and then read it...
Thanks
_________________
woei!
I'm just a newbie trying to use the linkcable in goldroad ASM,
this is what I have so far :
This is what I want to do :
Recommended Communication Procedure for MASTER unit (internal clock)
- Initialize data which is to be sent to slave (placed in REG_SCCNT_H for 8-bit mode or REG_SCD0 for 32-bit mode)
- Wait for SI to become LOW (slave ready). (Check timeout here!)
- Set Start flag.
- Wait for IRQ (or for Start bit to become zero).
- Process received data (received in REG_SCCNT_H for 8-bit mode or REG_SCD0 for 32-bit mode)
And this is my code, can somebody tell me if it works and if not, how I can get it to work...
ldr r2,=0x40012A ; REG_SCCNT_H
ldr r1,=0xFF
strb r1,[r2]
ldr r3,=0x4000128 ; REG_SCCNT_L
ldr r0,=0x00
SUBS r3,r0 ; Wait until r3 is 0
ldrbZ r3,[r2] ; and then read it...
Thanks
_________________
woei!