I am building a mmc reader using the code provided at
h**p://elm-chan.org/fsw/ff/00index_e.html
i have used the code from ffsample file.
the problem i am facing is that my whole circuit will be working on 3.3 v(both atmega 128 and the mmc card) but the max232 datsheet specifies that it can work on 4.5 to 5.5 v .so should i give the max232 5v supply sperately or is there any other way out.
The other way out have been mentioned already: use a RS-232 driver that works of +3.3V. That's the cleanest solution. IMHO clinging to MAX232 at the expense of setting up a whole separate power supply wouldn’t be well thought through (in other words - silly) engineering decision.
If you want to give MAX232 a separate +5V supply, that can work too. You need to check 2 things, though.
(1) +3.3V is above the logic threshold on the MAX232 side.
(2) The input on the AVR side is 5V-tolerant. In other words, make sure that 5V signal will not fry a microcontroller running of 3.3V.
I'm not an AVR expert, but generally speaking, Vcc=5V is not necessarily the same thing as 5V-tolerance. You can power a chip, which is rated for Vcc from 3.0V to 5.5V, with 3.3V, give it a 5.0V input and fry it. As a general rule, the input voltage shouldn't be greater than the power supply voltage. There is an exceprion to this rule dubbed "5V-tolerance". A logic input either has 5V-tolerance or doesn't. In the latter case, you need a 5V-tolerant buffer or an open-drain buffer with pullup or a voltage divider.
SPELTER said:
But i could not understand your first point....can you please clarify it a little.
If the logic-high threshold is above 3.3V, the logic high signall will not be seen. Luckily, this is not a problem, because MAX232 has a threshold at 2V. I've checked the datasheet (page 2, Input Logic Threshold High).