---
+ Post New Thread
Results 1 to 17 of 17
  1. #1
    Full Member level 2
    Points: 1,615, Level: 9
    liteon's Avatar
    Join Date
    Oct 2010
    Location
    PAKISTAN
    Posts
    149
    Helped
    26 / 26
    Points
    1,615
    Level
    9

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

    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

  2. #2
    Banned
    Points: 558, Level: 5

    Join Date
    Jan 2011
    Location
    bangalore
    Posts
    39
    Helped
    14 / 14
    Points
    558
    Level
    5

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

    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.



  3. #3
    Advanced Member level 5
    Points: 35,361, Level: 45
    ckshivaram's Avatar
    Join Date
    Apr 2008
    Location
    villingen (Germany) / Bangalore
    Posts
    5,070
    Helped
    2128 / 2128
    Points
    35,361
    Level
    45
    Blog Entries
    1

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

    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...
    " It is so simple to be happy,
    but it is so difficult to be simple"


    1 members found this post helpful.

    •   Alt30th January 2011, 06:01

      advertising

        
       

  4. #4
    Full Member level 2
    Points: 1,615, Level: 9
    liteon's Avatar
    Join Date
    Oct 2010
    Location
    PAKISTAN
    Posts
    149
    Helped
    26 / 26
    Points
    1,615
    Level
    9

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

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



  5. #5
    pauloynski
    Guest

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

    Quote Originally Posted by liteon View Post
    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 by pauloynski; 30th January 2011 at 08:42.



  6. #6
    Full Member level 2
    Points: 1,615, Level: 9
    liteon's Avatar
    Join Date
    Oct 2010
    Location
    PAKISTAN
    Posts
    149
    Helped
    26 / 26
    Points
    1,615
    Level
    9

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

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



  7. #7
    pauloynski
    Guest

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

    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 by pauloynski; 30th January 2011 at 10:34.



  8. #8
    FvM
    FvM is offline
    Super Moderator
    Points: 171,663, Level: 98
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    27,806
    Helped
    8772 / 8772
    Points
    171,663
    Level
    98

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

    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.



    •   Alt30th January 2011, 10:32

      advertising

        
       

  9. #9
    pauloynski
    Guest

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

    Quote Originally Posted by FvM View Post
    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.



  10. #10
    Advanced Member level 5
    Points: 35,361, Level: 45
    ckshivaram's Avatar
    Join Date
    Apr 2008
    Location
    villingen (Germany) / Bangalore
    Posts
    5,070
    Helped
    2128 / 2128
    Points
    35,361
    Level
    45
    Blog Entries
    1

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

    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.....
    " It is so simple to be happy,
    but it is so difficult to be simple"


    1 members found this post helpful.

  11. #11
    pauloynski
    Guest

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

    Quote Originally Posted by ckshivaram View Post
    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.



  12. #12
    Full Member level 2
    Points: 1,615, Level: 9
    liteon's Avatar
    Join Date
    Oct 2010
    Location
    PAKISTAN
    Posts
    149
    Helped
    26 / 26
    Points
    1,615
    Level
    9

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

    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.



  13. #13
    Super Moderator
    Points: 36,713, Level: 46
    Achievements:
    Created Album picturesCreated Blog entry7 years registered
    alexan_e's Avatar
    Join Date
    Mar 2008
    Location
    Greece
    Posts
    11,303
    Helped
    2036 / 2036
    Points
    36,713
    Level
    46
    Blog Entries
    6

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

    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



  14. #14
    FvM
    FvM is offline
    Super Moderator
    Points: 171,663, Level: 98
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    27,806
    Helped
    8772 / 8772
    Points
    171,663
    Level
    98

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

    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.


    2 members found this post helpful.

  15. #15
    Junior Member level 1
    Points: 839, Level: 6

    Join Date
    Aug 2010
    Location
    kathmandu
    Posts
    18
    Helped
    1 / 1
    Points
    839
    Level
    6

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

    Do the level shifter circuit works for 8051 ISP chips



  16. #16
    Super Moderator
    Points: 36,713, Level: 46
    Achievements:
    Created Album picturesCreated Blog entry7 years registered
    alexan_e's Avatar
    Join Date
    Mar 2008
    Location
    Greece
    Posts
    11,303
    Helped
    2036 / 2036
    Points
    36,713
    Level
    46
    Blog Entries
    6

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

    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


    1 members found this post helpful.

  17. #17
    Junior Member level 1
    Points: 839, Level: 6

    Join Date
    Aug 2010
    Location
    kathmandu
    Posts
    18
    Helped
    1 / 1
    Points
    839
    Level
    6

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

    Which programmer do I use to program 8051 with above circuit ?



+ Post New Thread
Please login