EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

5V EPROM read/write from 3V mcu

Started by abrous September 23, 2010
In article <i7g9ql$63n$1@news.eternal-september.org>, 
hamilton@nothere.com says...
> > On 9/23/2010 11:15 AM, abrous wrote: > > Hi guys, > > > > I have an application in which I have to read / write data to an 5V OTP > > EPROM (AT27c020) from an MCU. I have done this many times in the past from > > 5V microcontrollers like ATmega128. Now I want to do the same from a 3V > > device (LM3S9B90). MCU inputs are 5V tolerant. I don't want to use 3V > > EPROMS since they are rare. Also I don't want to use level shifters since > > they increase cost and board complexity. As far as I can see both devices > > are CMOS TTL compatible so I think that direct interface would be no > > problem logic level-wise. Am I correct or I am missing something ? > > > > Thanks in advance, > > > > Angelo > > > > > > --------------------------------------- > > Posted through http://www.EmbeddedRelated.com > > I would guess that Vcc and Vpp is the correct value for the AT27c020 to > be able to write. > > I don't see a problem with this, but at the limits of Max Vout from the > 3V cpu and Min Vin of the 5V EPROM may be a problem. > Also include the Temp limits at Max/Min Vout/Vin. > > I would also guess that you are bit banging the Add/Data lines to the > EPROM, so speed should not be a problem either. > > Have you tried it yet ?? > > Is the application Temp controlled, in other words, inside an office and > not outside in the sun/sow/rain ? > > good luck > > hamilton
Adding a comment too. The main area that you can get into problems here in transmitting the correct and workable logic levels between a 3.3V MCU and some 5V memory or peripheral part is in the sending of a logic high ("1") level from the 3.3V part to the 5V part. This is particularly problematic for the 5V parts that advertise themselves as being "CMOS" compatible logic levels. For parts that have "TTL" logic levels with a 2.4V VIH then it is easy for the 3.3V output of the MCU to drive the high level for the device and in this case you have a good situation. If you happen to be using an MCU device that has I/O pins that work like those on bog-standard 8051 type parts this 3.3V high to 5V high issue can easily be mitigated simply by adding pullup resistors to 5V on the signal lines in question. (There is a speed consideration that needs to be taken into account here in that a resistive pullup will have an extended rise time). On the 8051 style of part the output pin does not operate in push-pull mode and so the pullup it able to get the MCU output to pull all the way to 5V and overcome the high level drive problem. I did not look specifically at what type of I/Os your MCU has but the simple fact that it specifies 5V tolerant pins means that port pins as inputs can take this higher voltage. If you have the 8051 type bidirectional type I/Os then pullups on the outputs are your solution. If you have I/Os that only operate in push-pull mode, which means that as outputs they would only drive high out of the MCU at a maximum of the 3.3V supply rail then you have only one other choice and that is to add the pullup resistors and operate the I/O pins as "open drain" where you only drive them out as lows ("0") and turn the pin back around as an input for driving "1"s and let the pullups to 5V give you your high level. -- Michael Karas Carousel Design Solutions http://www.carousel-design.com

The 2024 Embedded Online Conference