View previous topic :: View next topic |
Author |
Message |
stoyanoff
Joined: 20 Jul 2011 Posts: 375
|
Where could I find the SPI pin's configuration of mdd stack? |
Posted: Thu Dec 13, 2012 4:14 am |
|
|
Hi! I'm using ccs mdd stack from 22.06.2012. But for this project I have to use the mmcsd.c and fat.c. So I made a simple program but it's not working. I haven't changed the hardware. So I think the problem is in the pin's configuration.
I dont remember how I adjusted the stack. Can you tell me where are the spi pin configuration in the mdd stack?
Thanks! |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
Re: Where could I find the SPI pin`s configuraion of mdd sta |
Posted: Thu Dec 13, 2012 6:08 am |
|
|
stoyanoff wrote: | Hi! I`m using ccs mdd stack from 22.06.2012. But for this project I have to use the mmcsd.c and fat.c. So I made a simple program but it`s not working. I haven`t changed the hardware. So I think the problem is in the pin`s configurantion.
I don`t remember how I adjusted the stack. Can you tell me where are the spi pin configuration in the mdd stack?
Thanks! |
I can translate this. I have modified the stack. It doesn't work. I can't remember what I did. How do I fix it?
It is similar to this type of question. I did something to my car. It doesn't work. I can't remember what I did. How do I fix it? _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9226 Location: Greensville,Ontario
|
|
Posted: Thu Dec 13, 2012 6:24 am |
|
|
The easiest,fastest way( less than 2 minutes of your time) is to do a 'filecompare' of your modifed file versus the original file.
If you don't have a fancy Windows based file comparing 'application' I know that filecomp.exe from dos6.22 still works today.
hth
jay |
|
|
stoyanoff
Joined: 20 Jul 2011 Posts: 375
|
|
Posted: Thu Dec 13, 2012 7:21 am |
|
|
My mmd stack works fine! I'm trying to make a program with mmcsd.c and fat.c drivers. When the mmd stack works I assume the hardware is OK.
Here is the program
Code: |
#include <18F66J60.h>
#FUSES HS,NOWDT
#use delay(clock=25M)
#use rs232(baud=9600, UART1, errors)
#include <string.h>
#include <stdlib.h>
#define MMCSD_PIN_SCL PIN_C3 //o
#define MMCSD_PIN_SDI PIN_C4 //i
#define MMCSD_PIN_SDO PIN_C5 //o
#define MMCSD_PIN_SELECT PIN_C2 //o
#include <mmcsd.c>
#include "fat.c"
void MakeFile(char *fileName)
{
if(mk_file(fileName) != GOODEC)
{
return;
}
}
void main()
{
char filename[]="text.txt";
char *pointer;
pointer=&filename[0];
if( fat_init() != GOODEC )
{
}
MakeFile(pointer);
while(1);
}
|
And I doesn't work. Am I doing something wrong?! I'm thinking I have a problem with the pins configuration but I'm using the standard one.
Thanks! |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Fri Dec 14, 2012 9:47 am |
|
|
Quote: | I'm using ccs mdd stack | First I didn't know what you mean, until I found out you mean the Microchip Memory Disk Drive File System.
Quote: | When the mmd stack works I assume the hardware is OK. | Yes, but with limitations.
- The CCS drivers do not support memory cards >2Gb
- We do not know the hardware SPI lines that were used in your MDD driver.
- Was the MDD driver using software SPI or hardware SPI? Software SPI uses TTL input levels and hardware SPI Schmitt Trigger levels. So even the same hardware connections can create different results.
- We do not know the error code from fat_init, this would give you some important clues.
Please don't start a new thread every other day on the same related topic.
Continue in your newest thread: http://www.ccsinfo.com/forum/viewtopic.php?t=49597 |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Sat Dec 15, 2012 4:17 am |
|
|
Quote: | First I didn't know what you mean, until I found out you mean the Microchip Memory Disk Drive File System. |
That's was also my thought, but stoyanoff is talking explicitely about a "ccs mdd stack from 22.06.2012",
which sounds confused. I'm not aware of any CCS provided "mdd stack" or a Microchip version with the said date.
Microchip MDD versions are identified by version numbers rather than dates.
In my view it makes no sense to think about the question without knowing what he's talking about. |
|
|
|