View previous topic :: View next topic |
Author |
Message |
hkmadathil
Joined: 02 Dec 2013 Posts: 2
|
pic18f67j60 mmc sd card |
Posted: Mon Dec 02, 2013 1:30 am |
|
|
Hi everyone, am new to programing pic and i tried to study it by programing blinking led and modifying it to blink according to key press. Now i want to implement sd card read and write with this pic18f67j60 development board. Can anyone help me with what i have to do?? am using mplab ide with ccs c toolsuite and i don't know much about this "include .h" files. I have to complete this as soon as possible. So, immediate reply is appreciated. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9246 Location: Greensville,Ontario
|
|
Posted: Mon Dec 02, 2013 6:27 am |
|
|
first you MUST get the HARDWARE correct !
That PIC is a 5 volt device and ALL MMC/SD cards are 3 volt devices,so you can't just wire up the 2 ,load code and think it'll work....
...the drivers that CCS provides will only work with <2GB cards, though others have modified them.
this topic has been extensively covered here, so spend a day or two and search this forum as well as the code library.
that PIC better have at least 1KB of RAM..
for faster help,describe which PIC board you're using as well as the MMC/SD card interface.other here may have used that combination .
the more details you provide the faster the replies.
hth
jay |
|
|
hkmadathil
Joined: 02 Dec 2013 Posts: 2
|
|
Posted: Mon Dec 02, 2013 11:04 pm |
|
|
thanks jay for the reply, am using pic 18f67j60 development board(3.3V Ethernet Controller Development Kit) with 2gb sd card.The sd card interface uses spi mode and i searched the forum for the code but i didn't understand which codes has to be header files and which is the original c code.so,if you can provide me step by step which files has to be added to the file??please help me... |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9246 Location: Greensville,Ontario
|
|
Posted: Tue Dec 03, 2013 10:37 am |
|
|
Sorry but I don't use MMC/SD devices....too many 'issues', found it easier and faster to use a Vinculum based flash drive module.
I know there's code here or in the code library, you just have to search a bit more.
others have done the work and if you use Google to search the site it's a LOT faster and easier.
hth
jay |
|
|
dish_moose
Joined: 06 Oct 2006 Posts: 13
|
|
Posted: Tue Dec 24, 2013 6:30 am |
|
|
I can see why arduino is so popular - code libraries that work. When you buy a compiler and there is software for peripherals - you expect them to work. This is not the case with CCS and the standard answer is to search to find fixes for the compiler. In the past, I have spent days fixing my software to find out the new release of my compiler was the thing that needed fixing?
-Bruce |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9246 Location: Greensville,Ontario
|
|
Posted: Tue Dec 24, 2013 6:48 am |
|
|
comment:
The reason Arduino is popular is that someone came out with a 'common platform' that anyone could design peripheral PCBs to. Same idea as the IBM PC when it got properly relaunched. Not a new idea to say the least.
As for non-working libraries, I've yet to find ONE CCS example that didn't work as designed. Been using their C since V2.540 and NEVER had an issue. Currently I'm in v4.mid...no need to upgrade to 5.xxx.
The 'problems' I've seen here all deal with trying to either misuse the driver (MMC/SD was designed for <-2GB cards) or using a newer PIC whose features haven't been throughly tested for 'compatability'. Considering the hundreds if not thousands of PIC types, CCS has done a GREAT job in getting C into all PICs.
Now if you want to make the PIC with CCS C MORE popular than an 'A', design a PCB based on the PIC18F46K22 about 3x5, 'A' compatible, with a cheap case. Then small manufatures, schools (high-uni), hobbiests will buy them and give the 'A' a run for the money.
cheers
jay |
|
|
dish_moose
Joined: 06 Oct 2006 Posts: 13
|
|
Posted: Thu Jan 09, 2014 7:22 am |
|
|
I can't remember which version it was now but I spent three days trying to fix my PIC project that I made a pcb for - turned out they "broke" the serial comm in my newly updated compiler. I reverted back to an older version that fixed the problem. I guess I'm still miffed at all the wasted time I spent because my compiler auto updated. I'm not so quick to install new updates any more.
-Bruce |
|
|
Douglas Kennedy
Joined: 07 Sep 2003 Posts: 755 Location: Florida
|
|
Posted: Thu Jan 09, 2014 10:17 am |
|
|
I agree that the CCS drivers do work for the PIC chips they were written for.
I would be nice if there were more comments in the CCS code. It makes it a bit more difficult to modify the CCS driver if needed. Coders often try to minimize the number of lines of code and often even hurt themselves due to the lack of documentation if they have to revisit the code.
The CCS IDE Options>IDE>files provides for search paths. These paths can be to folders containing drivers and can be specific to each project
Ex C:\Program files\PICC\drivers
C:\Program files\PICC\mydriversPIC24FJ256
The paths simplify the include file names. |
|
|
|