Reply by Meindert Sprang January 31, 20052005-01-31
"Carsten" <xnews1@luna.kyed.com> wrote in message
news:gp1tv0pc9p8u7h0uefcagrt2i9fo00s0i6@4ax.com...
> On Mon, 31 Jan 2005 09:34:41 +0100, "Meindert Sprang" > <mhsprang@NOcustomSPAMware.nl> wrote: > > I guess the resistor goes to vcc , but what about the diode ?? > > Is it like this : > > ---------------|--------Vcc > | > Pullup > | > > DO----------|>-------|-----------------------AtMega-Input
Almost. The diode must be the other way around and the resistor must be sitting between the atmega input and VCC But you'll probably don't need this at all. Meindert
Reply by Carsten January 31, 20052005-01-31
On Mon, 31 Jan 2005 09:34:41 +0100, "Meindert Sprang"
<mhsprang@NOcustomSPAMware.nl> wrote:

>The DO from the mega should be brought down to 3.3V. I have used a voltage >divider for that (2 resistors) but this was for a low speed connection >(57600 baud max.) I am afraid that the signal edges could be affected too >much to run this on 1 mbps or higher when communicating to the flash.
Im quite sure that Atmel says that the DataFlash has 5v tolerant input signals. But i have seen the divider trick used on a mmc card. Just for learning the opencolector stuff , how do you connect the schotky and the resistor. I guess the resistor goes to vcc , but what about the diode ?? Is it like this : ---------------|--------Vcc | Pullup | DO----------|>-------|-----------------------AtMega-Input Regards Carsten
Reply by CBFalconer January 31, 20052005-01-31
Carsten wrote:
> "Meindert Sprang" <mhsprang@NOcustomSPAMware.nl> wrote: > >>> Doesn't the Mega need 0.6*VCC as Vih(min) , the datasheet says >>> so .. 0.6 x 5V = 3V >> >> Correct. In my case, the LV device runs at 3.3V, and there it >> works. So did the OP really mean 3V or 3.3V? >> But even with 3V it can be done with a shottky diode (to make >> the 3V output behave like an open collector/drain) and a pull-up >> resistor. No need for fancy circuits. >
... snip ...
> > Does it have to be a Schottky diode ??
Or germanium :-) The point is that the lower forward drop does less harm to the low logic level. -- "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson
Reply by Meindert Sprang January 31, 20052005-01-31
"Carsten" <xnews1@luna.kyed.com> wrote in message
news:75qrv0tmarj5ak286vlurgva5sd66lo1pr@4ax.com...
> On Sun, 30 Jan 2005 14:39:36 +0100, "Meindert Sprang" > <mhsprang@NOcustomSPAMware.nl> wrote: > Sounds interresting , Meindert would you please give an example , i'm > a bit of a electronics beginner ??? > Im going to interface a Dataflash to a Mega162 , and was planning on > using a HCT as levelconverter for the dataflash SO , but would like to > avoid it if possible , i will be using a Micrel mic2920 LDO as 3v3 > regulator , or maybe "just" the 3 x 1n4148 in series from 5v "trick". > > Does it have to be a Schottky diode ??
Assuming the dataflash is 3.3V and the mega162 is on 5V, you can connect the DO from flash directly to the DI from the mega. Using a schottky diode is good for two reasons: the voltage drop is lower ( and therefore the raise of the 0-level voltage) and they are much faster and have a lower recovery time. But if the flash is on 3.3V you don't need a diode at all to simulate an open drain output to the mega. The DO from the mega should be brought down to 3.3V. I have used a voltage divider for that (2 resistors) but this was for a low speed connection (57600 baud max.) I am afraid that the signal edges could be affected too much to run this on 1 mbps or higher when communicating to the flash. Meindert
Reply by Carsten January 31, 20052005-01-31
On Sun, 30 Jan 2005 14:39:36 +0100, "Meindert Sprang"
<mhsprang@NOcustomSPAMware.nl> wrote:

>> Doesn't the Mega need 0.6*VCC as Vih(min) , the datasheet says so .. >> 0.6 x 5V = 3V > >Correct. In my case, the LV device runs at 3.3V, and there it works. So did >the OP really mean 3V or 3.3V? >But even with 3V it can be done with a shottky diode (to make the 3V output >behave like an open collector/drain) and a pull-up resistor. No need for >fancy circuits. > >Meindert
Sounds interresting , Meindert would you please give an example , i'm a bit of a electronics beginner ??? Im going to interface a Dataflash to a Mega162 , and was planning on using a HCT as levelconverter for the dataflash SO , but would like to avoid it if possible , i will be using a Micrel mic2920 LDO as 3v3 regulator , or maybe "just" the 3 x 1n4148 in series from 5v "trick". Does it have to be a Schottky diode ?? TIA Carsten
Reply by Meindert Sprang January 30, 20052005-01-30
"Carsten" <xnews1@luna.kyed.com> wrote in message
news:c6inv0d1vli1m8kh5gfjkjc9mopd10lcbt@4ax.com...
> > >You don't need all that. The TX signal from the u-blox can go right into
the
> >input of the atmega, since everything above 2.5V is seen as '1'. The
signal
> >from the atmega to the u-blox can be brought down to 3V by a voltage
divider
> >with two resistors: 12k and 18k. I've used this in a commercial product
and
> >it runs just fine. > > > >Meindert > > > > Doesn't the Mega need 0.6*VCC as Vih(min) , the datasheet says so .. > 0.6 x 5V = 3V
Correct. In my case, the LV device runs at 3.3V, and there it works. So did the OP really mean 3V or 3.3V? But even with 3V it can be done with a shottky diode (to make the 3V output behave like an open collector/drain) and a pull-up resistor. No need for fancy circuits. Meindert
Reply by Anton Erasmus January 30, 20052005-01-30
On 29 Jan 2005 13:54:06 -0800, "An Schwob in USA" <schwobus@aol.com>
wrote:

>Two better ideas: > >1. use an ARM microcontroller e.g. LPC2000 from Philips or Atmels SAM7s >they are all 3V by definition
The ATMega128 also has a 3V version available. The only "problem" is that the maximum clock frequency is only 8MHz in stead of 16MHz. For talking to a GPS module, an 8MHz ATMega128 should be plenty powerfull enough. Regards Anton Erasmus
Reply by An Schwob in USA January 29, 20052005-01-29
Two better ideas:

1. use an ARM microcontroller e.g. LPC2000 from Philips or Atmels SAM7s
they are all 3V by definition
2. as already mentioned compare output levels to input levels both
ways. If this is for a hobby project, just measure the voltage levels,
if it is for a product you want to vcreate and sell, you better get the
specifications of the output and input levels.

An Schwob

Martial Chateauvieux wrote:
> Hi, > > I want to connect a GPS Smart antenna SAM LS from u-blox, to
the
> UART of an atmega128 running under 5V. > > Unfortunately the GPS runs in 3V and has 3V compatible IOs. > I set up a 3V regulator already for the power supply. Can
someone
> explain how to build a level shifter from 3V to 5V with a
transistor ?
> (How do I choose it, how to connect it ?) > > any better idea ? > > Thanks > Martial Chateauvieux
Reply by Carsten January 29, 20052005-01-29
>You don't need all that. The TX signal from the u-blox can go right into the >input of the atmega, since everything above 2.5V is seen as '1'. The signal >from the atmega to the u-blox can be brought down to 3V by a voltage divider >with two resistors: 12k and 18k. I've used this in a commercial product and >it runs just fine. > >Meindert >
Doesn't the Mega need 0.6*VCC as Vih(min) , the datasheet says so .. 0.6 x 5V = 3V Carsten
Reply by Uwe Bonnes January 29, 20052005-01-29
Martial Chateauvieux <Chawig@t-online.de> wrote:

> Hi,
> I want to connect a GPS Smart antenna SAM LS from u-blox, to the > UART of an atmega128 running under 5V.
> Unfortunately the GPS runs in 3V and has 3V compatible IOs. > I set up a 3V regulator already for the power supply. Can someone > explain how to build a level shifter from 3V to 5V with a transistor ? > (How do I choose it, how to connect it ?)
> any better idea ?
Most 5 Volt Circuits can cope with 3.3 Volt CMOS Signal, which has around the same levels as normal 5 Volt TTL Outputs. If you really want to shift 3 Volt CMOS to 5 Volt CMOS, use a TTL level compatible CMOS gate, like AHCT, with 5 Volt supply. For the way 5 Volt CMOS to 3 Volt CMOS, look for 3 Volt Gates with 5 Volt tolerant inputs, like AHC. For bidirectional busses, there are devices to with two supplies, however ther need additional direction signals and need some conditions when switched on, or there is a chance that they will latch. If you want to connect a 3.3 Volt device to a 5 Volt TTL/CMOS Bus, use a passive busswitch, like the SN74CBTD3861. Bye -- Uwe Bonnes bon@elektron.ikp.physik.tu-darmstadt.de Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------