Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] RS232 TTL Converter for ATmega

Status
Not open for further replies.

codedawg

Newbie level 5
Joined
Apr 27, 2012
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,357
I've seen a lot of blog posts about using a RS232 with MAX232 for TTL serial conversion for microcontrollers. However, I'm not sure why we choose to use this. Does anybody know why TTL conversion is useful and when to use it? In my case my serial connection goes to an ATMega32. Couldn't I just connect my rs232 from my pc to my mcu directly without having to worry about using a max232?
 

by differences in definitions of 1 and 0 levels between the two is that we need an interface

Standard TTL circuits operate with a 5-volt power supply. A TTL input signal is defined as "low" when between 0 V and 0.8 V with respect to the ground terminal, and "high" when between 2.2 V and 5 V

now .

The RS-232 standard defines the voltage levels that correspond to logical one and logical zero levels for the data transmission and the control signal lines. Valid signals are plus or minus 3 to 15 volts; the ±3 V range near zero volts is not a valid RS-232 level. The standard specifies a maximum open-circuit voltage of 25 volts: signal levels of ±5 V, ±10 V, ±12 V, and ±15 V are all commonly seen depending on the power supplies available within a device.

ok
 
by differences in definitions of 1 and 0 levels between the two is that we need an interface

Standard TTL circuits operate with a 5-volt power supply. A TTL input signal is defined as "low" when between 0 V and 0.8 V with respect to the ground terminal, and "high" when between 2.2 V and 5 V

now .

The RS-232 standard defines the voltage levels that correspond to logical one and logical zero levels for the data transmission and the control signal lines. Valid signals are plus or minus 3 to 15 volts; the ±3 V range near zero volts is not a valid RS-232 level. The standard specifies a maximum open-circuit voltage of 25 volts: signal levels of ±5 V, ±10 V, ±12 V, and ±15 V are all commonly seen depending on the power supplies available within a device.

ok

So with my ATMega32, it considers anything between 0-0.8V as logical 0s and 2.2-5V as logical 1s as well. This why a TTL converter is needed (via MAX232). However, my PC looks at higher voltage levels as logical 0s and 1s. So TTL is really a voltage translation between the PC (or other device) and the microcontroller for bit operations. Did I understand you correctly?
 

yes, the output port 232 on the PC is usually +10 v-10v ,then you should always use a converter to make this becomes 0V ~ 5V (TTL) and of course also in the opposite direction, you get 0 ~ 5v (TTL) is transformed into ~ +10 v-10v (232)
 

yes, the output port 232 on the PC is usually +10 v-10v ,then you should always use a converter to make this becomes 0V ~ 5V (TTL) and of course also in the opposite direction, you get 0 ~ 5v (TTL) is transformed into ~ +10 v-10v (232)

Thank you very much!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top