Using an SD card with propeller assembly?
tholberton
Posts: 41
I want to use a micro sd card for a project i'm preparing for. Since it requires a lot of data transfer in a short amount of time, most of the code is going to be in assembly (I also prefer assembly since it involves understanding the hardware more). I'm having trouble figuring out where to start, though.
Here's the vague approach I've been thinking of, (just to get the basic SPI interface working):
pin 0 - CS selected on low
pin 1 - CLK
pin 2 - DO
pin 3 - DI
to write 1011 to DO
mov outa, 0110b
mov outa, 0000b
mov outa, 0100b
mov outa, 0000b
mov outa, 0110b
mov outa, 0000b
mov outa, 0110b
mov outa, 0000b
I know using jmp, xor, and a shift function i could make a loop... i just wanna know, is this the right approach to take? I'm kind of skeptical because of what needs to be on the falling or rising edge of a bit on some devices. any info or tips are appreciated.
Here's the vague approach I've been thinking of, (just to get the basic SPI interface working):
pin 0 - CS selected on low
pin 1 - CLK
pin 2 - DO
pin 3 - DI
to write 1011 to DO
mov outa, 0110b
mov outa, 0000b
mov outa, 0100b
mov outa, 0000b
mov outa, 0110b
mov outa, 0000b
mov outa, 0110b
mov outa, 0000b
I know using jmp, xor, and a shift function i could make a loop... i just wanna know, is this the right approach to take? I'm kind of skeptical because of what needs to be on the falling or rising edge of a bit on some devices. any info or tips are appreciated.
Comments
How fast do you need to go?
http://obex.parallax.com/objects/92/
http://obex.parallax.com/objects/619/