Brian:
Thanks for your fast response...
I am reading wav files stored in the M25P, and using this to send the address:
cs1 = 0 'SEND COMMAND AND ADDRESS
SHIFTOUT MOSI,SCK,1,[$03\8] 'read command $03
SHIFTOUT MOSI,SCK,1 ,[PAGE.BYTE1\8,PAGE.BYTE0\8,00\7]'addr 000000
I send the command and then the 24 bits address,but note in the last address byte I send
only 7 bytes. then I go to a loop to read the data and send it to the port to convert to
analog with a R2R network,until I find a special end of file char to stop the reading.
If I send the 8 bits, I get shifted data. With 7 bits I got the correct data and I can identify
the end of file byte. I do not know why.
the read routine is this:
ASM
MOVLW 8
MOVWF _CNT
SIGUE
BTFSS _MISO ;MOV BIT TO CHR,0
BCF _CHR,0
BTFSC _MISO
BSF _CHR,0
BSF _SCK ;READ AFTER SENDING THE CLOCK
RLF _CHR,1
BCF _SCK
NOP
NOP
NOP
NOP
NOP
DECFSZ _CNT,1
GOTO SIGUE
ENDASM
Am I missing some previous command to set up the chip for reading..?
I will test your routines to see if I got an improvement.
Thanks again...
Ruben de la Pena V.
Bookmarks