CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Where could I find the SPI pin's configuration of mdd stack?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
stoyanoff



Joined: 20 Jul 2011
Posts: 375

View user's profile Send private message

Where could I find the SPI pin's configuration of mdd stack?
PostPosted: Thu Dec 13, 2012 4:14 am     Reply with quote

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

View user's profile Send private message Send e-mail Visit poster's website

Re: Where could I find the SPI pin`s configuraion of mdd sta
PostPosted: Thu Dec 13, 2012 6:08 am     Reply with quote

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: 9163
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Dec 13, 2012 6:24 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Dec 13, 2012 7:21 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Dec 14, 2012 9:47 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Dec 15, 2012 4:17 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group