SD Card Coding - IO from Scratch Extra
Вставка
- Опубліковано 18 чер 2024
- In my main channel video I interface the SD card and show an abridged version of the coding. This is the longer edit with an extra bit of intro.
0:00 Introduction
0:22 Preamble
0:56 Tutorial reference
1:36 Power up Sequence
3:58 Sending Commands
5:12 Initialization Flowchart
6:03 CMD0 (Go Idle)
9:52 CMD8 (Send IF Cond)
12:48 CMD8 Fail?
13:14 Try another card
14:16 CMD58 (Read OCR)
16:38 Tidy Up
19:04 ACMD41 (SD Send Op Cond)
23:44 SD_Init
24:42 CMD17 (Read Single Block)
30:41 Read Success!
33:27 Write test code
34:09 CMD24 (Write Block)
37:56 Write Success!
38:13 A more interesting Test
39:12 Outro
The Tutorial I was translating for my cpu: www.rjhcoding.com/avrc-sd-inte...
Join us on Discord: discord.gg/jmf6M3z7XS
Follow me on Twitter: twitter.com/WeirdBoyJim
Support the channel on Patreon: www.patreon.com/JamesSharman
Great video James! My only complaint is it was too short 😂
Your assembly knowledge is amazing. I can't believe how much you would actually write before running a test, and most of the time it works.
Im glad you keep the trouble shooting in. Circuits and programming is a large part of problem solving. I like to see someone else bashing there head against the wall trying to figure out whats wrong for once 😂
Cant wait for the next video.
Glad you liked it! I try and keep everything as an honest account of the development process.
This channel gets extra crunchy, so satisfying. Well, maybe I should watch the video first... 😁
max read and write are user selectable, nothing magic about them, nor does the protocol mandate any numbers. From what I have gleaned, writing to flash is tricky business, which is probably why the max_write is 3 times (roughly) the max_read.
I actually found in the documentation that these are derived from explicit timeout durations. The read is 100ms which is 400,000 cycles in my cpu. So my SD_Max_ReadAttempts is 400000 / 33 = 12121
Oh nice... I'm all up for some extended programming videos. :)
I think I recognise that tutorials page... There aren't that many out there with an "AVR ASM" heading on. :)
Still trying to find the right way to present programming.
31:07 Which program did you use?
That was my own piece of code I wrote to block read from the device.
@@JamesSharmanExtras Ah, I see.