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.

max232 or simple resistor-transistor level converter for Atmel avr.

Status
Not open for further replies.

liteon

Full Member level 2
Full Member level 2
Joined
Oct 13, 2010
Messages
149
Helped
27
Reputation
54
Reaction score
27
Trophy points
1,308
Location
PAKISTAN
Activity points
2,510
Hi.
I need to know the advantages of using Max232 (if any) against simple resistor-transistor level converter for serial port avr programmer.
Is max232 able to provide some better level of protection to serial port and avr Mcu compared to to resistor-transistor level converter?


Thank you very much
 

definetly yes. Max232 is always better and professionally designed circuit any time as it is having the best protection to serial port.. If proper design is not done you may end up damaging the UART inside the controller.
 

My feeling is the charge pump inside the UART charges and discharges according to the levels derived ... this is a very slow process and i dont know that this charging and discharging which is the most critical in UART functionality could be achieved by just using a resistor transistor level converter...

how and in what way do you swing the level between +25v TO -25v, USING TRANSISTOR logic and transmit it in serial cable...
 
  • Like
Reactions: MRAMA

    MRAMA

    Points: 2
    Helpful Answer Positive Rating
Ckshivaram. I dont know much about the serial transmission.That's why i asked.
And thank you both for your suggesions.
 

Ckshivaram. I dont know much about the serial transmission.That's why i asked.
And thank you both for your suggesions.

I think there is some confusion here. The resistor/transistor circuit mentioned above is,´usually, a simple inverter that provides 0V to 5V signal span. Definitelly, it´s bad engineering and works only for very short cables and low noise environment. It doesn´t conform to the RS232 specs. It is not guaranteed to work for any line receiver. It is often found in chinese products. It should work for the input signal, as a receiver. Never for a transmitter.
 
Last edited:

Here are attached the images of both resistor-transistor level converter and max232 interface in question.
 

Attachments

  • avr@serial..jpg
    avr@serial..jpg
    55.9 KB · Views: 197
  • rtlc.jpg
    rtlc.jpg
    14.9 KB · Views: 210

This circuit looks like a serial programmer. The transistor is used as a receiver (works well as a receiver, may have problems at very fast speeds by causing a delayed signal due to large base resistor but this is not important here) for driving a led and the RESET signal only. Probably the cable will be short. I see no problem in using it as it is.

The transistor was used because the two inputs of the MAX232 were already used. With the values shown the voltage at the RESET pin will be clamped to about the voltage on the led and may not function properly. Decrease the collector resistor to about 330R and increase the resistor in series with the reset led to about 2k2.
 
Last edited:

The second circuit is almost identical to SI Prog, the serial programming adapter suggested for PonyProg. I guess, there will be some 100k working out there. You possibly may want to add protection for the MISO line, but apart from this point, it serves the purpose, I think.

I know, by the way, several professional instruments, that are using 0 to 5V CMOS level for RS232 TxD. It's in fact ignoring the RS232 specification, but apparently not causing problems in reliable operation. The cable length is mostly short, of course.
 

The second circuit is almost identical to SI Prog, the serial programming adapter suggested for PonyProg. I guess, there will be some 100k working out there. You possibly may want to add protection for the MISO line, but apart from this point, it serves the purpose, I think.

I know, by the way, several professional instruments, that are using 0 to 5V CMOS level for RS232 TxD. It's in fact ignoring the RS232 specification, but apparently not causing problems in reliable operation. The cable length is mostly short, of course.

I agree, works well at home. Never in an industrial environment, but this seems no to be the case since now we know the circuit is a programmer.
 

This concept is very much used in chinese models mostly... Most of the standards are voileted in the chinese products for cost cutting and people tend to be happy if it works no matter what happens to violation in technology.....
 
  • Like
Reactions: MRAMA

    MRAMA

    Points: 2
    Helpful Answer Positive Rating
This concept is very much used in chinese models mostly... Most of the standards are voileted in the chinese products for cost cutting and people tend to be happy if it works no matter what happens to violation in technology.....
Agree, but in this case, using the transistor as an input conforms to the standard, at least for low speeds.
 

Wow.
This discussion is giving a good knowledge.And yes it is a serial programmer device for Atmel avr.It is for ponyprog2000 which is not very fast itself if i am not wrong.
So far i think i better go with Max232.
One more question? Did anybody use it with Bascom AVR from MCS electronics.Bascom Avr has "AVR ISP Programmer" in device selection section.
 

The is a better variant from the above transistor level converter, it is intended for LPC ARM serial programming, at least it uses a capacitor
but the fact still remains that this is mainly to download code from the pc to the mcu, it uses the energy stored in the receive process to be able to send some data back to the pc .
MAX232 can be used for faster communication and doesn't have any limitation in the send/receive ratio.

datasheets/LPC/LPC-ICP.pdf

Alex
 

Yes, generating a negative voltage from the input line brings the interface nearer to RS232 compatibilty at first sight. A non-obvious problem of the design can be brought up by using a rather high 10k load resistor for TxD. From a certain cable length on (e.g. 5 m), capacitive coupling between TxD and RxD will generate false start bits towards the PC. Thus although intending to improve the reliability, it may be worse than with a simple (non RS232 compliant) CMOS driver.
 
Do the level shifter circuit works for 8051 ISP chips
 

This level translation circuit can be used with any mcu that has UART,
it uses Tx and Rx and is not chip specific however read the previous comments,
this is not as good as a dedicated chip but it can probably do the job if you want a simple solution.

Alex
 
  • Like
Reactions: MRAMA

    MRAMA

    Points: 2
    Helpful Answer Positive Rating
Which programmer do I use to program 8051 with above circuit ?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top