SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Vincentdean
#8070
I would like send 8-bit analog sensor data from a PIC18F452 to a MMC
(Sparkfun microsd: SKU Number:PCB-microSD) so it can be read by a computer via a card reader.

I understand the idea in theory but cannot realize it physically.

I need a starting place in terms of coding the 18F452 in PicBasicPro as well as any considerations one has in interfacing with Flash memory.

Many thanks in advance.

-V
By upand_at_them
#8106
It's pretty easy. The MMC can be run in SPI mode. There are a few examples on the web; just Google "pic mmc".

To access the files from a PC you have to write to them in FAT format.

Mike
By jayjay
#8111
Hi

There was an article published in Issue 176 of Circuit Cellar which implemented a FAT16 on a MSP430 processor, it uses SPI for low level access, you can download the code from ftp://ftp.circuitcellar.com/pub/Circuit ... ham176.zip

Take note that you would need atleast 1KB RAM buffer as the MMC "write" is done in 512 bytes.

HTH
Jay
By Vincentdean
#8121
Great, thanks for the info-this should get me started.

Is there a standardize method to write FAT formatted files from the PIC to an MMC?

Cool. Thanks again.

-V
By jayjay
#8150
The "standardised" way most people interface SD/MMC to a MCU is thru SPI protocol. So it might be worthwhile looking into the SPI interface.

HTH
Jay
By brainwav
#8450
on the same topic (or close to), does anyone know of a PIC that has 1k of ram? The most I've found is 392 bytes.
By upand_at_them
#8510
The 18F PICs do. You can get a list by using the parametric search on Microchip's site.

Mike
By gonzzo
#8515
jayjay wrote:Hi

There was an article published in Issue 176 of Circuit Cellar which implemented a FAT16 on a MSP430 processor, it uses SPI for low level access, you can download the code from ftp://ftp.circuitcellar.com/pub/Circuit ... ham176.zip

Take note that you would need atleast 1KB RAM buffer as the MMC "write" is done in 512 bytes.

HTH
Jay
anyone would be able to scan in that article for me?

dan
By Nutter
#8566
You can purchase that article alone from here for $1.50:
http://www.circuitcellar.com/magazine/176toc.htm

It's a 7p article with a pretty big schematic on the first page that probably won't come out too well when scanned.