Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

MMC reader by atmega 128

Status
Not open for further replies.

inferno_nsit

Newbie level 5
Joined
Sep 5, 2006
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,367
atmega128 mmc

Hi ,
i'm making a ATmega128 based MMC reader , using the library provided at http://elm-chan.org/fsw/ff/00index_e.html .

Having some problem in the following area .

1. Can pencil cells be used to achieve 3.3V for MMC'c Vcc ?
2. Will 3.3v logic MMC and 5V logic ATmega128 fine on same board ? i mean will it work properly ?
3. Do we need a heatsink for LM317 which we are using to achieve 3.3V for MMC ?

Thanks in advance
eagerly waiting for a response.
 

ffsample

The library seems to work fine, I tried FatFs & Tiny-FatFs on the ATmega128.

For testing I used a couple of diodes to drop Vcc to about 3.6V, used voltage dividers on CS, MOSI & SCK and connected MISO direct.
 

mmc atmega128

i heard that using voltage divider to get 3.3 V is a very bad idea and so is by using diode.
 

atmega mmc

Wat about the 3.3 v and 5v problem.Can two devices operating on different voltages (mmc at 3.3 v and atmega at 5v) work together?
Also it is mentioned on the atmega128 datasheet that vcc can be between 2.7 to 5.5v.So can one have around 3v for the mmc as well atmega 128.Is it safe?


@encrypted if you have implemented the same library on atmega 128 can u please tell what is the actual interface we r using...is it the hyperterminal(or any other serial terminal).....I mean where is the user interface,where would the data read from the mmc be displayed (and in what format)...same problem with writing.I hope u understand what i am trying to convey
 

logic mmc

I wanted to test the library and I have a 5v 16MHz ATmega128 board so the diodes and dividers was the quickest way to get it working with what I had in hand. I used a floppy disk connector to connect to the card and I took the MMC card from a Nokia 6600. I had the whole thing up and running only a few hours after finding the library.

There is no problem with the levels, the MMC card talks to the 128 using only the MISO line and this is connected directly so the 128 sees about 3.6V for high. The CS, Clock and MOSI to the MMC card are all dropped by the voltage dividers.

I didn't use the ffsample code provided but I took the mmc.c file and modified it. I wrote my own test code, very simple, open file, write 'Hello World!', close file. Put the card into my PC and checked for the file, all OK!

If you use the ffsample then use the USART to talk with Hyper Terminal but I was already using both USARTS.

You could of course run everything of around 3 volts and this is what's shown in the PNG that comes with ffsample but you cannot run your clock at 16MHz if you use low voltage.
 

atmega128 + mmc

Ok fine..thx

just one more query you mentioned that one can not run the clock at 16 MHZ if we use low voltage.In the png in the ffsample in library it has used a 9.2 mhz crystal at XTAL1 and XTAL2.
Does this oscillator has anything to do with the code except for the speed at which commands are executed?I mean can i use a different value oscillator at XTAL without having to modify the code.

One more thing ,suppose i am using 3.4v both for MMC and ATMEGA128,what is the safest value of crystal that can be used at XTAL.And does running on low voltage effect the crystal at TOSC pins(a 32khz crystal is connected in the sample png).
 

atmega32 mmc card

I didn't build the ffsample files but I've taken a look for you. If you change the XTAL you need to change '#define SYSCLK 9216000' in uart.c and make sure your baudrate error is not too high. The SPI bus is already running full speed and the mmc card can handle much higher speeds.

If you look at the datasheet then the safest max value of cystal at 3.4v would be 8MHz with a ATmega128L. But you should be OK with a 9.216MHz crystal at 3.4v on a ATmega128.

Running at a low voltage should make no difference to the 32KHz cystal, you must include it it you want to try the ffsample, it's used for the RTC.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top