alot of fast data
I am trying to read 64 words fast put them in to ram and output them after I am done reading. using the sx/28
·
On the basic stamp I could do it like this.
·
FOR i=0 TO 126 STEP 2
PULSOUT conv, 2
SHIFTIN dat, clk, MSBPRE, [noparse][[/noparse]number\16]
PUT i, Word number
NEXT
·
FOR i=0 TO 126 STEP 2
GET i, Word number
DEBUG DEC number, CR
NEXT
·
Is there an easy way to write to all the banks? Or will I need to make a loop for ever bank.
·
On the basic stamp I could do it like this.
·
FOR i=0 TO 126 STEP 2
PULSOUT conv, 2
SHIFTIN dat, clk, MSBPRE, [noparse][[/noparse]number\16]
PUT i, Word number
NEXT
·
FOR i=0 TO 126 STEP 2
GET i, Word number
DEBUG DEC number, CR
NEXT
·
Is there an easy way to write to all the banks? Or will I need to make a loop for ever bank.
Comments
[noparse][[/noparse]Edit] It occurred to me that I have the SX/B 2.0 beta so I lifted the assembly code generated for working with big arrays and put it into the PUT_SCRATCH and GET_SCRATCH routines -- a lot cleaner. I'm not much of an assembly guy, so I can't really explain how it works; I can tell you that it does.
Post Edited (JonnyMac) : 8/27/2008 11:14:50 PM GMT
The real address is calculated using this:
fsr_addr = (idx + (idx & $F0) + base) | $10
in which idx is the logical index in the array, and base is the start address of the array (which is·scratchA)
regards peter
I will look at the compiler output again to see if I made an error in my transcription.
I understood that. I just explained what the assembly code was doing.
Just in case somebody would be interested in what was going on.
Edit: Jon, I noticed you edited your post.
The code is working as you used it. The formula is valid for all addresses.
regards peter
Post Edited (Peter Verkaik) : 8/29/2008 8:25:04 PM GMT