• AVR Freaks

Helpful ReplyHot![SOLVED] PIC18F & SD Card

Author
andy_n
Senior Member
  • Total Posts : 155
  • Reward points : 0
  • Status: offline
2020/05/23 03:24:46 (permalink)
0

[SOLVED] PIC18F & SD Card

Hi,
 
I am trying to write SDHC EVO 32Gb with PIC18F without success.
Initialization, reading without problem.
 
My write sequence:
CMD16, 512byte, CRC 0x81  
CMD24, Addresse, CRC 0x6f  //WRITE_SINGLE_BLOCK
Send 0xFE
Send 512 byte data
Wait for 0x05 answer
 
0xE5 answer is coming (0xE5 & 0x1F = 0x05)  but SD Card is blocked.
No more reading & initialization only after cut from supply.
 
Thanks for help.
 
post edited by andy_n - 2020/06/12 03:06:16
#1
upand_at_them
Super Member
  • Total Posts : 521
  • Reward points : 0
  • Joined: 2005/05/16 07:02:38
  • Location: Pennsylvania
  • Status: offline
Re: PIC18F & SD Card 2020/05/23 04:05:11 (permalink) ☄ Helpfulby andy_n 2020/05/23 04:13:39
+2 (2)
Did you try it without setting the block length (CMD16)?
#2
andy_n
Senior Member
  • Total Posts : 155
  • Reward points : 0
  • Status: offline
Re: PIC18F & SD Card 2020/05/23 04:20:12 (permalink)
0
I've been sitting there for 3 days including a headache and it was so easy.
Thanks Mike.
 
Do you know that: you are lucky to done it but feel stupid :)
#3
bkamen
Super Member
  • Total Posts : 835
  • Reward points : 0
  • Joined: 2010/01/26 12:39:27
  • Location: Central Illinois, USA
  • Status: offline
Re: PIC18F & SD Card 2020/06/03 11:02:33 (permalink)
+1 (3)
Don't forget to edit your post to include [SOLVED] in the subject so others can find/see that the thread is complete.

Cheers,

 -Ben
#4
andy_n
Senior Member
  • Total Posts : 155
  • Reward points : 0
  • Status: offline
Re: PIC18F & SD Card 2020/06/15 07:26:42 (permalink)
+1 (1)
Hi,
One problem more!
 
It works with EVO 32GB very well but another SDHC cards has a problem:
Initialization is successful but the card response 0xC2 on CMD18
 
Somebody knows such behavior?
Logic analyzer doesn't tell me anything I understand.
 
Regards
 
 
post edited by andy_n - 2020/06/15 08:38:03
#5
Jump to:
© 2020 APG vNext Commercial Version 4.5