They say the first week is always the hardest. At the start of my second week, I was supposed to get the computer to read and write into an SD card by programming the PIC18F8722. After being on the receiving end of the massive scolding last week, I was being very fearful of getting it again and I guess the fear really hampered my thoughts and I wasted one day looking completely at the wrong direction in trying to find a solution.

After spending a little too much time on something completely unrelated, my supervisor put me back on track yet again with some helpful pointers although this time with a much milder tone (which I am more comfortable with) by reminding me to always think and giving me a massive hint on looking up on the SD card. I did, and I found plenty of useful information from the internet as well as the blog of a previous intern who worked on this before.

From the website of elm-chan.org/docs/mmc/mmc-e.html, I learnt a little more on the configuration of the SD card which has to operate in SPI mode. In order to do so, we have to follow the initialisation procedure which is found on that website. Despite knowing the proper commands that is needed to be used to initialise the SD card, I was having trouble figuring out the structure of the C language given in the sample coding of SD-SPI.c.

Which is then I decided to continue doing the C tutorial which my supervisor sent me and after doing a couple of exercises, I tried to figure out the relevant parts from the reference coding. This time, I kind of understand the whole thing better and I have an idea of how to code the initialisation part of the SD card. I will test the code out next week although I have a strong feeling that it might fail. Having said that, this is just one part of the whole thing as I still need to get the UART part working.

Seems like this is going to take a while with my limited knowledge, but well at least I have learnt to think more.


0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.