Vous êtes sur la page 1sur 14

SD MMC Card Fat16 Demo in CCS C and Proteus Design File - Sonsivri

http://www.sonsivri.to/forum/index.php?topic=6658.0

Sidekick domain is published. Bookmark it, right now.

HOME

CONTACT US

HELP

SEARCH

GOOGLETAGGED

DONATIONS

LOGIN

REGISTER

Welcome, Guest. Please login or register. Did you miss your activation email?

September 05, 2013, 10:09:42 10:09

Login with username, password and session length

l i gh t bl ue

l i ght nav y

l i ght si l ver

l i ght t ur qu oi se

l i ght gr ee n

l i ght ol i ve

l i ght gol den

l i ght br ow n

l i ght r ed

l i ght r os e

l i g ht l i l ac

l i gh t vi ol et

Sonsivri > Electronics > Pic C Languages (Moderator: o2) > SD MMC Card Fat16 Demo in CCS C and Proteus Design File

previous next
Pages: [1] 2 All
Author
PRINT

Topic: SD MMC Card Fat16 Demo in CCS C and Proteus Design File (Read 28414 times)

0 Members and 1 Guest are viewing this topic.

fagari
Junior Member Offline Posts: 35

SD MMC Card Fat16 Demo in CCS C and Proteus Design File


on: November 20, 2007, 11:24:43 23:24

Here is my SD MMC Card Fat16 Example project. It is very good Example for SD MMC Card.

Thank You -Given: 3 -Receive: 41

Demo Read CONTURY.TXT in SD CARD and Send RS232 port. Sorce code and Proteus file Link: http://rapidshare.com/files/71131573/SD_MMC.rar
Logged

ysy
Guest

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #1 on: November 21, 2007, 04:58:47 04:58

I dont like ccs, its buggy. microchip produce pic12 pic16 pic18 pic24 pic33, their c compilers are different, features in c18 and c30 and c32 are also different. i think developers using them are hard to learning these products and tools.
Logged

1 of 14

9/5/2013 1:31 AM

SD MMC Card Fat16 Demo in CCS C and Proteus Design File - Sonsivri

http://www.sonsivri.to/forum/index.php?topic=6658.0

bxac
V.I.P Newbie Offline Posts: 16 Thank You -Given: 4 -Receive: 2

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #2 on: November 21, 2007, 03:51:10 15:51

Proteus has model for MMC. Is this going to work if I want the final design with SD?

Logged

aj49m
Active Member Offline Posts: 102 Thank You -Given: 36 -Receive: 40

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #3 on: November 22, 2007, 03:32:14 15:32

in theory, mmc and sd are same

Logged

endSly
Guest

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #4 on: November 25, 2007, 03:04:46 15:04

MMC and SD are no identical. SD is a little more fat


Logged

incubus22
Newbie Offline Posts: 26 Thank You -Given: 23 -Receive: 4

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #5 on: November 27, 2007, 05:42:54 05:42 Quote from: fagari on November 20, 2007, 11:24:43 23:24 Here is my SD MMC Card Fat16 Example project. It is very good Example for SD MMC Card. Demo Read CONTURY.TXT in SD CARD and Send RS232 port. Sorce code and Proteus file Link: http://rapidshare.com/files/71131573/SD_MMC.rar

Hello fagari! How did you make the image file (COUNTRY.TXT) into a Proteus MMC image (cardimage.mmc)? What program did you use? Please teach me how. Can I convert any text file into this image (cardimage.mmc)? How about the reverse? I mean, when I want to convert the cardimage.mmc to a text file. Is this possible?
Logged

2 of 14

9/5/2013 1:31 AM

SD MMC Card Fat16 Demo in CCS C and Proteus Design File - Sonsivri

http://www.sonsivri.to/forum/index.php?topic=6658.0

sslobodyan
Newbie Offline Posts: 11 Thank You -Given: 1 -Receive: 2

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #6 on: November 27, 2007, 12:13:32 12:13

With WinHex you can read some sectors from your floppy or hard disk. I just save file to clean floppy and save some sectors from floppy to cardimage.mmc. Floppy has FAT16, hard disk FAT32.

Logged

incubus22
Newbie Offline Posts: 26 Thank You -Given: 23 -Receive: 4

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #7 on: November 27, 2007, 02:57:33 14:57 Quote from: sslobodyan on November 27, 2007, 12:13:32 12:13 With WinHex you can read some sectors from your floppy or hard disk. I just save file to clean floppy and save some sectors from floppy to cardimage.mmc. Floppy has FAT16, hard disk FAT32.

Thanks for replying! Can I convert a certain file in my hard disk(for example sample.txt) into cardimage.mmc? How do I do this? There are many convert options in WinHex. Which one should I choose? Please teach me how. It's my first time to use WinHex. Also, after manipulating the cardimage.mmc in Proteus using a PIC18F(with FAT32 implementation), can I bring it back to the text file format which can be understood by Windows? I am confused with this because I can't understand the data whenever I open cardimage.mmc with Wordpad or Winhex.

Logged

fagari
Junior Member Offline Posts: 35 Thank You -Given: 3 -Receive: 41

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #8 on: November 27, 2007, 03:06:24 15:06

Hello incubus22 I use 32 MB SD Card and copy CONTRY.TXT in SD Card. after make image file with WinHex. if you don't have sd Card. You can use 'USB Flash Disk Example' in the Protus 7.2

3 of 14

9/5/2013 1:31 AM

SD MMC Card Fat16 Demo in CCS C and Proteus Design File - Sonsivri

http://www.sonsivri.to/forum/index.php?topic=6658.0

Logged

incubus22
Newbie Offline Posts: 26 Thank You -Given: 23 -Receive: 4

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #9 on: November 27, 2007, 07:55:49 19:55 Quote from: fagari on November 27, 2007, 03:06:24 15:06 Hello incubus22 I use 32 MB SD Card and copy CONTRY.TXT in SD Card. after make image file with WinHex. if you don't have sd Card. You can use 'USB Flash Disk Example' in the Protus 7.2

Thank you very much fagari!

I'll try it.


Logged

aj49m
Active Member Offline Posts: 102 Thank You -Given: 36 -Receive: 40

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #10 on: November 27, 2007, 09:27:54 21:27 Quote from: endSly on November 25, 2007, 03:04:46 15:04 MMC and SD are no identical. SD is a little more fat

i refered me to protocolo, case SPI

Logged

Marineland
Active Member Offline Posts: 151 Thank You -Given: 13 -Receive: 123

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #11 on: November 29, 2007, 10:09:05 10:09

Hi fagari, Here's a difference between both SD Image file, I explain: You file (cardimage.mmc) is a FAT16 and the file (disk.bin) from Proteus sample is a FAT12. Thus, if i try to use your file (cardimage.mmc) in the simulation, windows don't create a virtual "PROTEUS USB" mass storage... (btw: there's not source to change in FAT16 in Proteus sample directory). I've not yet find another "Virtual USB Mass Storage" on the web! If you or anybody have a answer, it's welcom... Regards, Marineland
Logged

fagari
Junior Member Offline

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #12 on: November 29, 2007, 07:26:57 19:26

Hi Marineland

4 of 14

9/5/2013 1:31 AM

SD MMC Card Fat16 Demo in CCS C and Proteus Design File - Sonsivri

http://www.sonsivri.to/forum/index.php?topic=6658.0

Posts: 35 Thank You -Given: 3 -Receive: 41

1. Copy 'cardimage.mmc'(in my project) file to 'Proteus 7 Professional\SAMPLES\VSM for USB\PICDEM FS USB\MSD' directory. 2. Open picdem 'fs usb.dsn' file with Proteus. 3. Right click on the MMC and select 'Edit Properties'. 4. Change Size of Media(MB) to 32 and Card Image File to 'cardimage.mmc' and press Ok. 5. Run simulation and plug usb connector. 6. You must see new removeble drive in my computer.

File read ok. but write and format have problem.


Posted on: November 29, 2007, 07:19:54 19:19 - Automerged

Hi Marineland again Proteus sample file imformation : The USB firmware used in this sample is freely available from the Microchip Technologies website (Application Note AN1003) and has not been modified. AN1003 application support FAT16, FAT32 or NTFS file system.

Logged

Marineland
Active Member Offline Posts: 151 Thank You -Given: 13 -Receive: 123

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #13 on: November 30, 2007, 12:08:12 12:08

Hi Fagari, Thanks for the response... I'v followed yours instructions but the simulation failed: This's the error: "Can't ceate or open card image file: cardimage.mmc" What i'm doing wrong? Regards, Marineland

Logged

5 of 14

9/5/2013 1:31 AM

SD MMC Card Fat16 Demo in CCS C and Proteus Design File - Sonsivri

http://www.sonsivri.to/forum/index.php?topic=6658.0

fagari
Junior Member Offline Posts: 35

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #14 on: November 30, 2007, 11:05:56 23:05

Hi Marineland, My MSD Project is here.

Thank You -Given: 3 -Receive: 41

http://rapidshare.com/files/73423843/MSD.rar Try this. if your problem going on, try reinstall proteus. Good luck.

Logged

Marineland
Active Member Offline Posts: 151 Thank You -Given: 13 -Receive: 123

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #15 on: December 01, 2007, 03:27:14 15:27

Hi, Fagari, I've tried your project and It's works fine... Thanks again... Regards, Marineland

Logged

mikepic
Newbie Offline Posts: 19 Thank You -Given: 13 -Receive: 8

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #16 on: December 05, 2007, 04:13:04 16:13

Hi, I'll try your project, because some time ago I tried to make a project with SD card and CCS libraries, but it didn't work at all Thanks
Logged

kev
Newbie Offline Posts: 9 Thank You -Given: 8

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #17 on: December 23, 2007, 12:29:54 12:29

Thanks for the info, I'll try your project as soon as I am allowed to se the links !
Logged

6 of 14

9/5/2013 1:31 AM

SD MMC Card Fat16 Demo in CCS C and Proteus Design File - Sonsivri

http://www.sonsivri.to/forum/index.php?topic=6658.0

-Receive: 0

xzb
Newbie Offline Posts: 27 Thank You -Given: 16 -Receive: 5

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #18 on: December 28, 2007, 03:04:13 03:04

Thanks fagari! I can pat use !

Logged

Trump
Guest

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #19 on: December 28, 2007, 09:28:41 21:28

Hm.... The driver work, but I have some problem in open files in the root, only the first file open. Files in other folder are OK. And how I close a file?
Logged

sevesa
Newbie

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #20 on: March 14, 2008, 11:24:49 23:24

Muted
Offline Posts: 8 Thank You -Given: 0 -Receive: 0

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE& nodeId=1824&appnote=en532040 Memory Disk Drive File System Library

Logged

xzb
Newbie Offline Posts: 27 Thank You -Given: 16 -Receive: 5

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #21 on: May 13, 2008, 10:13:47 10:13

I use this Project proteus OK,but a true PIC18F252 failing. why? SD 128M see following data. **** SD / MMC FAT16 Read Demo for Sonsivri **** Now Open File on SD Card cmd0 cmd=40 FF 01 cmd=41 FF 01 FF FF FF FF FF FF FF FF FF FF FF FF F FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

7 of 14

9/5/2013 1:31 AM

SD MMC Card Fat16 Demo in CCS C and Proteus Design File - Sonsivri

http://www.sonsivri.to/forum/index.php?topic=6658.0

FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F F FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF cmd1 cmd=41 FF 00 cmd=50 FF 00 cmd=51 FF 00 read block address=0 read block tries for FE =2 sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 //proteus display: sector0=EB 3C 90 4D 53 44 4F 53 35 2E 30 00 02 04 04 00 02 00 02 00 00 F8 F2 00 3F 00 FF 00 61 00 00 00 cmd=51 FF 00 read block addr =32 read block tries for FE =2 sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cmd= FF 00 read block address=64 read block tries for FE =2 sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cmd=51 FF 00 read block address=96 read block tries for FE =2 sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cmd=51 FF 00 read block address=128 read block tries for FE =2

8 of 14

9/5/2013 1:31 AM

SD MMC Card Fat16 Demo in CCS C and Proteus Design File - Sonsivri

http://www.sonsivri.to/forum/index.php?topic=6658.0

sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cmd=51 FF 00 read block address=160 read block tries for FE =2 sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cmd=51 FF 00 read block address=192 read block tries for FE =2 sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cmd=51 FF 00 read block address=224 read block tries for FE =2 sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cmd=51 FF 00 read block address=256 read block tries for FE =2 sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cmd=51 FF 00 read block address=288 read block tries for FE =2 sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cmd=51 FF 00 read block address=320 read block tries for FE =2

9 of 14

9/5/2013 1:31 AM

SD MMC Card Fat16 Demo in CCS C and Proteus Design File - Sonsivri

http://www.sonsivri.to/forum/index.php?topic=6658.0

sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cmd=51 FF 00 read block address=352 **** SD / MMC FAT16 Read Demo for Sonsivri **** Now Open File on SD Card cmd0 cmd=40 FF 01 cmd=41 FF 01 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F F FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F F FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF cmd1 cmd=41 FF 00 cmd=50 FF 00 cmd=51 FF 00 read block address=0 read block tries for FE =2 sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cmd=51 FF 00 read block address=32 read block tries for FE =2 sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0 cmd=51 FF 00 read block address=64 read block tries for FE =2

10 of 14

9/5/2013 1:31 AM

SD MMC Card Fat16 Demo in CCS C and Proteus Design File - Sonsivri

http://www.sonsivri.to/forum/index.php?topic=6658.0

sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0 00 00 00 00 00 00 00 00 cmd=51 FF 00 read block address=96 read block tries for FE =2 sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cmd=51 FF 00 read block address=128 read block tries for FE =2 sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cmd=51 FF 00 read block address=160 read block tries for FE =2 sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cmd=51 FF 00 read block address=192 read block tries for FE =2 sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cmd=51 FF 00 read block address=224 read block tries for FE =2 sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cmd=51 FF 00 read block address=256 read block tries for FE =2

11 of 14

9/5/2013 1:31 AM

SD MMC Card Fat16 Demo in CCS C and Proteus Design File - Sonsivri

http://www.sonsivri.to/forum/index.php?topic=6658.0

sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cmd=51 FF 00 read block address=288 read block tries for FE =2 sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cmd=51 FF 00 read block address=320 read block tries for FE =2 sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cmd=51 FF 00 read block address=352 read block tries for FE =2 sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cmd=51 FF 00 read block address=384 read block tries for FE =2 sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cmd=51 FF 00 read block address=416 read block tries for FE =2 sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 cmd=51 FF 00 read block address=448 read block tries for FE =2 sector0=02 00 06 07 E0 C9 61 00 00 00 9F C9 03 00 00 00 00 00 00 00 00 00

12 of 14

9/5/2013 1:31 AM

SD MMC Card Fat16 Demo in CCS C and Proteus Design File - Sonsivri

http://www.sonsivri.to/forum/index.php?topic=6658.0

00 00 00 00 00 00 00 00 00 00 cmd=51 FF 00 read block address=480 read block tries for FE =2 sector0=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA cmd=51 FF 00 read block address=512
Last Edit: May 13, 2008, 10:34:22 10:34 by xzb

Logged

fr5cu
Guest

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #22 on: May 14, 2008, 03:24:41 15:24

can you read an other type of card?


Logged

MCan
Junior Member Offline Posts: 68 Thank You -Given: 14 -Receive: 119

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #23 on: June 02, 2008, 05:53:07 05:53

when i compile your code, compiler show a message box (i/o error 103)

end of file Logged aquila non captat muscas.

xzb
Newbie Offline Posts: 27 Thank You -Given: 16 -Receive: 5

Re: SD MMC Card Fat16 Demo in CCS C and Proteus Design File
Reply #24 on: June 02, 2008, 08:07:44 08:07

hi kireytir you delete except source .c and .h fiile,afresh the compiler ok!

Logged

Pages: [1] 2 All

PRINT

13 of 14

9/5/2013 1:31 AM

SD MMC Card Fat16 Demo in CCS C and Proteus Design File - Sonsivri

http://www.sonsivri.to/forum/index.php?topic=6658.0

previous next
Jump to:

DISCLAIMER WE DONT HOST ANY ILLEGAL FILES ON THE SERVER USE CONTACT US TO REPORT ILLEGAL FILES ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS ... Copyright 2003-2999 Sonsivri.to ... Powered by SMF 1.1.18 | SMF 2006-2009, Simple Machines LLC | HarzeM Dilber MC

14 of 14

9/5/2013 1:31 AM

Vous aimerez peut-être aussi