-1

I want to establish UART communication between LPC2138 (3.3V) and ATmega88(5V). But since they are at different power logic level, i need bidirectional level translator in between both devices.

I come up with following part

As seen on above site, module has MOSFET, resistors and capacitors mounted on PCB. I want to know, Can it work in my case ( for UART comm )?

If TXB0104 is device used for interfacing, is below connection correct? Please check pin mapping and is there any pull up needed at LPC2138 or ATmega88 side or shown connection is enough.

Thanks.

UART translator

Electroholic
  • 729
  • 9
  • 34

3 Answers3

1

A simple solution is to run ATmega88 at 3.3V and no external hardware is required.

If not, a cascaded two transistors could do the trick, or 2 stage Not gate (in both TX and RX lines). As the communication in the line is only in one direction. Thi will cost you afew money.

Nasr
  • 136
  • 1
  • is correct however it will reduce the speed grade and you have to use the crystal at 10MHZ – Lokanath Sep 02 '15 at 11:30
  • @Lokanath UART communication is `9600b/s` .. `115200 b/s` maximum, that's speed which most of trasnsistors can handle. Any buffer module you could use is consist of the same hardware, and if it produce problems just use better transistors. But why specifically you mention 10MHz – Nasr Sep 02 '15 at 11:37
  • see speed grades part in data sheet page no 1 ,the possibilities for operation at 3.3V is only if crystal used is 4Mhz or 10Mhz ,i just considered the higher speed – Lokanath Sep 02 '15 at 11:40
  • You are right, I thought you are taking about speed will decrease when we use transistors with 5V power. – Nasr Sep 02 '15 at 11:43
  • oh nono...not the transistor:) – Lokanath Sep 02 '15 at 11:46
  • without using level translator, if I use pull up at 5V line, will it work? – Electroholic Sep 02 '15 at 15:44
  • You may damage LPC2138, check it's datasheet to see if it could sustain 5V on it's pins. – Nasr Sep 02 '15 at 15:50
  • Please see my updated question. Is this correct interfacing? – Electroholic Sep 03 '15 at 05:28
  • Yes, right interfacing, no more pullup's is required. – Nasr Sep 03 '15 at 09:35
1

Please refer this post to know difference between I2C AND USART

USART, UART, RS232, USB, SPI, I2C, TTL, etc. what are all of these and how do they relate to each other?

The part you have chosen has not shown anywhere that it can be used with USART but in fact I2C needs only 2 wires while USART needs 4 wires so your ebay part is not compatible since 2 wires are taken for power itself. I would recommend you using this

https://www.sparkfun.com/products/11771

http://www.protocentral.com/breakout-boards/461-voltage-level-translator-txb0104-breakout.html

http://www.tenettech.com/product/3148/voltage-level-translator-txb0104-breakout

http://www.robotshop.com/en/voltage-level-translator-txb0104.html

I am sure that the above device will meet your application requirements

Hope this helps

Lokanath
  • 412
  • 3
  • 12
  • To order this module from sparkfun, it will take some time to get it in India, Unfortunately, I have time constraint. If you can suggest some online module ( from indian origin ), it will be great help. Thanks. – Electroholic Sep 02 '15 at 11:36
  • 1
    @Electroholic Updated links for india – Lokanath Sep 02 '15 at 11:44
  • Thanks for your answer. But in datasheet, it's not mentioned that it can be used for UART. Can I use it in my application? – Electroholic Sep 02 '15 at 11:52
  • 1
    please see the last comment in https://www.sparkfun.com/products/11771 ,a person has verified that it can be used for both UART and SPI – Lokanath Sep 02 '15 at 11:56
  • without using level translator, if I use pull up at 5V line, will it work? – Electroholic Sep 02 '15 at 15:44
1

The part that you suggested seems to work fine( however the supplier is lacking of some more depth information about the part). Just make sure that you make the right connections:

3V3 side - 5V side

LPC2138 TX -> ATmega88 RX

LPC2138 RX -> ATmega88 TX

  • without using level translator, if I use pull up at 5V line, will it work? – Electroholic Sep 02 '15 at 15:44
  • 1
    Yes you try to use a pull-up with a diode, check this link: http://electronics.stackexchange.com/questions/102603/is-a-n-channel-mosfet-save-reliable-for-level-shifting-uart-from-3v3-to-5v – Fernando Luiz Cola Sep 02 '15 at 17:18