thata
Newbie level 1
- Joined
- Mar 12, 2014
- Messages
- 1
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 5
hello guys ;
I m trying to use a PIC 16f877a to write on an MMC 128 M , Mikroc + ISIS .
I initialized well my MMC .
But when i try to use the command 24 to write a single block i get a parametric error as a response
Any idea how to fix this ?
thank youuu
I m trying to use a PIC 16f877a to write on an MMC 128 M , Mikroc + ISIS .
I initialized well my MMC .
But when i try to use the command 24 to write a single block i get a parametric error as a response
Code:
SPI1_WRITE(0xFF);
SPI1_WRITE(0x58); // send mmc write block
SPI1_WRITE(0x00); // this is the high order byte address
SPI1_WRITE(0x00);
SPI1_WRITE(0x02);
SPI1_WRITE(0x00); // always zero as mulitples of 512 bytes (strange standard)
SPI1_WRITE(0xFF);
// read the response and print it to the portd to see
SPI1_WRITE(0xFF);
read=SSPBUF;
portd=read;
Any idea how to fix this ?
thank youuu