Vksalian 0 Posted April 27, 2013 Share Posted April 27, 2013 Hello Bluehash, I managed to get the hardware connection working (and your code running) after a series of troubleshoots as listed below, 1. I found that P1.5 and GND of MSP430G2553 were short may be due to excess current fed into the line (it was my mistake). So replaced the IC itself. 2. I added pull-up resister of 10k each for SCK, DO, DI pins (Ref : http://www.mcu-turkey.com/wp-content/uploads/2012/12/sch_2-1024x701.png ). 3. Added 100nF capacitor across the VDD and VSS. 4. Retained pullup resister at 47k for CS pin. (Ref : TI site) Thanks for all the help offered by you in solving the problem. Regarding the commands, it seems "ft" and "fd" are the same except the alignment of display. Some points : 1. I tried on 1GB, 2GB, 4GB, 8GB Miro SD cards successfully. 2. It worked for both FAT16 as well as for FAT32. 3. I soldered the wires directly to SD adapter and then inserted the micro SD. Thanks & Regards, Vksalian. Why don't you connect it according to the schematic for the SDCard booster? The code is meant for that. It will be easier to debug. Lets see: P1.5 ->SCLK-------->Card Pin5 P1.6 ->MISO ------>Card Pin7 P1.7 ->MOSI-------->Card Pin2 P2.0 ->Chip select->Card Pin1 ..and ground/power. Forget about the CardDetect for now Quote Link to post Share on other sites
bluehash 1,581 Posted April 27, 2013 Author Share Posted April 27, 2013 Hello Bluehash, I managed to get the hardware connection working (and your code running) after a series of troubleshoots as listed below, 1. I found that P1.5 and GND of MSP430G2553 were short may be due to excess current fed into the line (it was my mistake). So replaced the IC itself. 2. I added pull-up resister of 10k each for SCK, DO, DI pins (Ref : http://www.mcu-turkey.com/wp-content/uploads/2012/12/sch_2-1024x701.png ). 3. Added 100nF capacitor across the VDD and VSS. 4. Retained pullup resister at 47k for CS pin. (Ref : TI site) Thanks for all the help offered by you in solving the problem. Regarding the commands, it seems "ft" and "fd" are the same except the alignment of display. Some points : 1. I tried on 1GB, 2GB, 4GB, 8GB Miro SD cards successfully. 2. It worked for both FAT16 as well as for FAT32. 3. I soldered the wires directly to SD adapter and then inserted the micro SD. Thanks & Regards, Vksalian. Congrats! Must be feeling good. :thumbup: Vksalian 1 Quote Link to post Share on other sites
f3a46 0 Posted May 27, 2013 Share Posted May 27, 2013 what is the difference between command fd and ft??? Quote Link to post Share on other sites
bluehash 1,581 Posted May 28, 2013 Author Share Posted May 28, 2013 ft looks like an improved version of fd. Quote Link to post Share on other sites
f3a46 0 Posted June 7, 2013 Share Posted June 7, 2013 if I were to use clock frequency of 1MHz instead of 16MHz and baud rate 9600 remains the same: BCSCTL1 = CALBC1_1MHZ; DCOCTL = CALDCO_1MHZ; what do I need to change other than these 2 line of codes in void setup () and change to #define F_CPU 1000000 in config.h? Quote Link to post Share on other sites
Hammerwang 1 Posted June 30, 2013 Share Posted June 30, 2013 Hi, do you think this coding is compatible with a MicroSD break out board, in place of the regular SD Card Booster Pack? for example, this: http://www.hobbytronics.co.uk/microsd-transflash-breakout It has the same functional pins as the SD Card Adapter, i was just wondering because that would be incredibly more convenient Thanks! Quote Link to post Share on other sites
cubeberg 540 Posted July 1, 2013 Share Posted July 1, 2013 Hi, do you think this coding is compatible with a MicroSD break out board, in place of the regular SD Card Booster Pack? for example, this: http://www.hobbytronics.co.uk/microsd-transflash-breakout It has the same functional pins as the SD Card Adapter, i was just wondering because that would be incredibly more convenient :-P Thanks! You should be fine. MicroSD->SD adapters just pass those pins through - they're functionally identical. Quote Link to post Share on other sites
Hammerwang 1 Posted July 4, 2013 Share Posted July 4, 2013 Hey @@bluehash, I downloaded your code and set it up as a new project in CCS. I have the correct connection from the LP board to the SD card, confirming it thru an Energia program. But when I build & debug the code, I can't get any responses from the Terminal Console. I am using the g2553, the Termite 2.9 terminal, a microSD to SD card adapter, my baud rate on the terminal and code is 9600, the RXD/TXD jumpers are set in the horizontal position to communicate with the computer. And I even try typing 'Enter' or '> (Enter)' into the terminal, but I do not have any response. Are there any other settings that I need to configure to get the prints & communication to show? Thanks Quote Link to post Share on other sites
bluehash 1,581 Posted July 4, 2013 Author Share Posted July 4, 2013 @@Hammerwang When you click run in the debugger, it should put up a string on the terminal. Can you short your rx,tx to make sure your serial loop is working. Quote Link to post Share on other sites
Hammerwang 1 Posted July 5, 2013 Share Posted July 5, 2013 ahh ok, so the RX and TX jumpers need to be Vertical || for CCS, whereas in Energia they have to be Horizontal =So I got the terminal to print out the welcome messages, but I cannot get it to respond to 'di' or any variation of the command.such as >di, > di, or any other spaces in between.Could it be an SPI connection error? I keep switching between the microSD breakout board and the SD card adapter to see if either one works, but still nothing yet :/ Edit: I tried setting breakpoints during the forever loop, and I can't get any characters to be used at all.I feel as if there may be an issue with the get_line function from the terminal? It reads in the characters, ie. '>' or 'd', but it doesn't trigger the switch-cases or anything. Quote Link to post Share on other sites
bluehash 1,581 Posted July 5, 2013 Author Share Posted July 5, 2013 Try appending CR LF in your terminal software. I use teraterm. Download from logmett.com Quote Link to post Share on other sites
Hammerwang 1 Posted July 6, 2013 Share Posted July 6, 2013 @@bluehash, you're awesome!! that was it, the SD card works and it can initialize the disk, FS, and read and open files! only a little thing, when i prompt the >di command, i get "rc=1" which i think means that the res status is FR_DISK_ERR. But the card is still readable and everything else works afterwards. I was wondering if that's a concern at all?But yeah! Definitely feels good to have this project working! Do you think it is possible to use the petitFS to read an .mp3 file and utilize that data to a decoder? bluehash 1 Quote Link to post Share on other sites
bluehash 1,581 Posted July 7, 2013 Author Share Posted July 7, 2013 Good to know. Try issuing di again. I sometimes get 1 as a response. Hammerwang 1 Quote Link to post Share on other sites
f3a46 0 Posted July 11, 2013 Share Posted July 11, 2013 hey if i used the "ft" command to read, is there a way to put all that content in a string? Quote Link to post Share on other sites
f3a46 0 Posted July 15, 2013 Share Posted July 15, 2013 is there a way to save it to an excel file (.xlsx) instead of .txt file? Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.