Author |
Message |
Topic: Using fat.c |
skelzer
Replies: 27
Views: 60532
|
Forum: General CCS C Discussion Posted: Fri May 20, 2016 4:30 am Subject: Using fat.c |
I think you need /file, not \file
Thanks... |
Topic: Using fat.c |
skelzer
Replies: 27
Views: 60532
|
Forum: General CCS C Discussion Posted: Thu May 12, 2016 3:46 am Subject: Using fat.c |
Suggests you are trying to talk to the card too quickly at boot. There is an initialisation time specified in the SD documents, that they require before they can start. The demo code does a print befo ... |
Topic: Using fat.c |
skelzer
Replies: 27
Views: 60532
|
Forum: General CCS C Discussion Posted: Wed May 11, 2016 4:17 am Subject: Using fat.c |
OK. It was just that it could wake up in the wrong mode otherwise....
I really think you need to triple check the connections.
Working now, just did :
while(nRet!=0){
n ... |
Topic: Using fat.c |
skelzer
Replies: 27
Views: 60532
|
Forum: General CCS C Discussion Posted: Wed May 11, 2016 3:49 am Subject: Using fat.c |
Do you have the required resistors on the SD connections?.
Ideally 10K pull-ups on SCK, SDO, SDI, and SDCS.
The SCK one is only to speed the rising edges (you can get away without this), The SDI ... |
Topic: Using fat.c |
skelzer
Replies: 27
Views: 60532
|
Forum: General CCS C Discussion Posted: Wed May 11, 2016 2:59 am Subject: Using fat.c |
Sorry, I made some undocumented changes, this is my new code:
#include <main.h>
#define MMCSD_PIN_SCL PIN_B11 //o
#define MMCSD_PIN_SDI PIN_B13 //i
#define MMCSD_PIN_SDO ... |
Topic: Using fat.c |
skelzer
Replies: 27
Views: 60532
|
Forum: General CCS C Discussion Posted: Wed May 11, 2016 2:20 am Subject: Using fat.c |
Just using mmcsd.h and trying to do a mmcsd_init() will keep on giving me timeout. I'm totally clueless right now, any ideas?
I've got the lines pulled up, I'm using a 3v uC and I'm still getting n ... |
Topic: Using fat.c |
skelzer
Replies: 27
Views: 60532
|
Forum: General CCS C Discussion Posted: Fri May 06, 2016 4:23 am Subject: Using fat.c |
Ok, here it is:
https://gyazo.com/8c1e46631b9c9a49c9f85b83907cbc52 (with #use FIXED_IO( B_outputs=PIN_B2, PIN_B10, PIN_B11, PIN_B15))
https://gyazo.com/ab4dcb38a8e5eefc1dc5187220525a2d (without ... |
Topic: Using fat.c |
skelzer
Replies: 27
Views: 60532
|
Forum: General CCS C Discussion Posted: Fri May 06, 2016 4:01 am Subject: Using fat.c |
Have you actually tested that you have the sector read and write working on the device?.
Fat_init, calls the mmcsd_init. This does the speed changes to switch the device up to the faster SPI clock. ... |
Topic: Using fat.c |
skelzer
Replies: 27
Views: 60532
|
Forum: General CCS C Discussion Posted: Fri May 06, 2016 2:43 am Subject: Using fat.c |
Hello again , things got really busy and I couldn't work on this project, but I'm back on it :D.
It seems the program keeps looping at fat_init();
If I comment this line here:
#use ... |
Topic: Using fat.c |
skelzer
Replies: 27
Views: 60532
|
Forum: General CCS C Discussion Posted: Wed Apr 27, 2016 2:34 am Subject: Using fat.c |
Whoa.
Your way of 'fixing' it, means you can be writing to an undeclared area of memory. It'll compile, but won't necessarily work.....
Problem is that:
File *file_stream;
Means that 'file ... |
Topic: Using fat.c |
skelzer
Replies: 27
Views: 60532
|
Forum: General CCS C Discussion Posted: Wed Apr 27, 2016 2:08 am Subject: Using fat.c |
Fixed:
Added the line
#device PASS_STRINGS=IN_RAM
after the #include <33EP512GP504.h>
and changed the declaration of
FILE file_stream;
to
FILE *file_stream; |
Topic: Using fat.c |
skelzer
Replies: 27
Views: 60532
|
Forum: General CCS C Discussion Posted: Wed Apr 27, 2016 2:02 am Subject: Using fat.c |
One warning. In the code library you will find three threads, including an SDHC modification, and a couple of fixes for faults in the standard SD driver. There is then an 'accrued' version at the star ... |
Topic: Writing outside dsPIC33EP512GP504 near ram |
skelzer
Replies: 7
Views: 26575
|
Forum: General CCS C Discussion Posted: Tue Apr 26, 2016 8:46 am Subject: Writing outside dsPIC33EP512GP504 near ram |
The point is that you shouldn't have to be doing this, as I said, contact CCS.
Will do! |
Topic: Using fat.c |
skelzer
Replies: 27
Views: 60532
|
Forum: General CCS C Discussion Posted: Tue Apr 26, 2016 8:36 am Subject: Using fat.c |
Comments in line:
#define MMCSD_PIN_SCL PIN_B10 //o
#define MMCSD_PIN_SDI PIN_B11 //i
#define MMCSD_PIN_SDO PIN_B12 //o
#define MMCSD_PIN_SELECT ... |
Topic: Using fat.c |
skelzer
Replies: 27
Views: 60532
|
Forum: General CCS C Discussion Posted: Tue Apr 26, 2016 7:43 am Subject: Using fat.c |
well first place to look is in the 'code library' here...
or general search 'SD'...
also
You MUST use a 3 volt( 'L' series) PIC OR proper logic level translation between the 3 volt SD card and a 5 ... |
|