RD is just a name that you created which points to same memory adress (PortA) and bit at that adress (.3) as PortA.3 does.
So RD[i] is then the same thing as PortA.3[i] but why are you doing...
Yes, sorry, RD is variable of pin PORTA.3
The "RD[i] = 1" is from the PBP manual where I subbed RD for a PORTx.x pin in the original.
I'll try your suggested change.
You're missing my point - I think.
You have the variable rd aliases to PortA.3 (not PortC.1 as far as I can see) but what is supposed to happen inside the loop when you acces the rd "variable"...
Henrik, thanks for your reply.
Yes, I am getting all of the 16bit data out of the CF card. With the REPEAT....UNTIL after each block data call (4x256)
and with the GOSUB dat....RETURN used only...
My initial thought, since you're saying that it does work if you paste the content of the dat subroutine inplace of each GOSUB to TO the dat subroutine, was/is that it's a timing issue. I don't...
Hi. First time post here. I'm using PIC Basic Pro, MPLAB ASSEM and a PIC16F870.
Need some help with the GOSUB in my code.
I'm telling a Compact Flash card that I want to read 256 sectors and then...
After you write to the SSPBUF if you wait for SSPIF instead of BF then ACKSTAT will be valid.
Solved my own problem! I have to wait at least 1 clock pulse (15 usec) after the BF flag resets (buffer is empty) before looking at ACKSTAT, to allow the ninth clock pulse to complete. My fix:
Dave, I'd be happy to but the fact remains that it's MCSPX that crashes "randomly", for me and for others so it's not something unique at my end. Of course some other application may be the root...
I know only little bit about using this device. can you give me some suggestions for this?