Powered by Invision Power Board


Forum Rules Forum Rules (Please read before posting)
  Reply to this topicStart new topicStart Poll

> Usart 5v -> 3v3 And 3v3 To 5v, Whats the 'correct' way.
Sparks
Posted: April 16, 2009 11:47 am
Reply to this postQuote Post


Sr. Member
*****

Group: Trusted Members
Posts: 400
Member No.: 750
Joined: April 08, 2004




Hi,
I've been working on a project which interfaces a microcontroller (5V) with a radio (3V3) via USART. Initially I used a MAX3232, however the output is inverted (I didn't realise USART isnt RS232) which took AGES before noticed. I replaced the 5V -> 3V3 with a resistor and 3V3 zener (currently 3V7 with the resistors I had) and allowed the 3V output to trigger the 5V logic directly.

My solution works, but seems like a bodge. Its too late now, but I was wondering whats the correct/standard way to do it?
PMEmail PosterUsers Website
Top
Demolitron
Posted: May 18, 2009 02:02 am
Reply to this postQuote Post


Newbie
**

Group: Members+
Posts: 19
Member No.: 24,062
Joined: May 12, 2009




The RS232 line levels are indeed inverted. A logic 1 is transmitted at the VL level, for the MAX3232 that is -5.5V and a logic 0 is transmitted at the VH level or +5.5V... Keep in mind the output of an MCU is TTL level RS232. Just google RS232 a bit and you'll see what I mean.

Most of the time a simple way I do 5V -> 3.3V logic is by using a voltage divider. And 3.3V to 5V can be accomplished with a mosfet or BJT unles your 5V part's Vhi threshold is below 3.3V, in that case you need nothing. 100% reliable 3V -> 5V usually takes an active component or two.

They also make level shifter IC's.

This post has been edited by Demolitron on May 18, 2009 02:06 am
PMEmail Poster
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 


:: support us ::




ElectronicsSkin by DutchDork & The-Force