Hi,
I finally got the parts that I needed and started playing with SDFS. Since I'm running my 18F4550 at 3.3V I connected all the MicroSD card pins directly to the PIC. I did not install the 10k resistors since my configuration is a little bit different. Do I need to use these 10K resistors?
I ran the SDTEST.BAS and it worked. It created a file TEST1.TXT with the text "ABC". I could see the file in my cell phone that runs Windows Mobile 6.1. Now, I can't read this card in my Windows XP PC. Somehow, XP does not like FAT16 format in the SD cards. How do you read your SD files in your computer? Is there any work around for this? I don't want to install Win98 in one of my old computers just for this.
Robert
Running at 3.3 volts I still pull up pins 8 and 9 on the full size SD cards, the remainder I run straight.
Norn is correct about the formatting. I read my FAT16 cards on XP, Vista, Vista 7, and Linux. No problems.
Dave
Always wear safety glasses while programming.
Hi,
Thank you guys for your help. Yes, Norm is correct about the formatting of the MicroSD card. It works.
The breakout board that I got from sparkfun.com doesn't have the connection for the NC pad. Maybe, the resistor at NC is not necessary after all.
http://www.sparkfun.com/commerce/pro...roducts_id=544
Now, I have a question about SDTEST.BAS. The code to write to the card is
This code will write "ABC" to the cardCode:' Write to file FAT_src[0] = "A" FAT_src[1] = "B" FAT_src[2] = "C" FAT_count = 3 Gosub FSfwrite Serout2 PORTC.6, 84, [ "Write ", Dec FAT_error, $d, $a] If (FAT_error != 0) Then Stop
But, for data logging I need the entries in diferent linesCode:ABC
Can you do that with SDFS? Thank you for your help.Code:A B C
Robert
Maybe the pull-ups on pins 8 and 9 are not needed... Old habits are hard to break.
Code:' Write to file FAT_src[0] = "A" FAT_src[1] = $d FAT_src[2] = $a FAT_src[3] = "B" FAT_src[4] = $d FAT_src[5] = $a FAT_src[6] = "C" FAT_src[7] = $d FAT_src[8] = $a FAT_src[9] = $d FAT_src[10] = $a FAT_count = 11 Gosub FSfwrite Serout2 PORTC.6, 84, [ "Write ", Dec FAT_error, $d, $a] If (FAT_error != 0) Then Stop
Dave
Always wear safety glasses while programming.
mackrackit,
Very nice. It works!! This is not in the readme.txt file. How do you know these things? Just kidding.![]()
Now, I have another problem when trying to combine USB and SDFS. I'm not sure if I should open another thread for this problem.
When using USB with PBPL you get the next errors
The fix for this problem is to include the 18F4550.bal file and the project files in the same directory. This solution was given by Mister_E in the next threadCode:ERROR: Macro USBINIT? not found in macro file. ERROR: Macro USBSERVICE? not found in macro file. ERROR: Macro USBIN?CBBL not found in macro file. ERROR: Macro USBOUT?CBBL not found in macro file.
http://www.picbasic.co.uk/forum/show...=macro+usbinit
Now, if I want to combine USB and SDFS I would have to use the file 18F4550.bal. But if I compile my SDFS file with this file in the same directory I get the following error
I'm using PBP 2.50, MPASM 5.22, and MCS 3.0.0.5. Any help would be greatly appreciated. Thank you.Code:ERROR: Unable to fit variable SDC_buffer
Robert
Bookmarks