This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

3.3V supply for ttl/rs232

Hi,
I find a problem when I wanted to run a ATMEGA32 with VCC supply of 3.3V, everything is okay except USART. I see that if supply voltage is 5V then USART works well. With the same ttl/rs232 module and supply voltage of 3.3V USART works fine with STM32 MCU. I used internal 8 Mhz clock both for AVR and ARM. what is the suggestion to overcome the problem in AVR?

Parents
  • Dear Per,
    Thanks for the points.
    I used both MAX232CSE and ST232C as transceiver module chips.
    I find problem when sending data to PC. The characters in terminal were like this '????'.
    In scope for both 5V and 3V3, I see a good -5V to 5V signal amplitude in the output of transceiver chip.
    Atmega32a voltage in datasheet is 2.7V to 5.5V.
    In Max232 datasheet the supply voltage is in range of 4.5V to 5.5V. If I need to run max232 with 5V why it works with 3V3 with STM32?

Reply
  • Dear Per,
    Thanks for the points.
    I used both MAX232CSE and ST232C as transceiver module chips.
    I find problem when sending data to PC. The characters in terminal were like this '????'.
    In scope for both 5V and 3V3, I see a good -5V to 5V signal amplitude in the output of transceiver chip.
    Atmega32a voltage in datasheet is 2.7V to 5.5V.
    In Max232 datasheet the supply voltage is in range of 4.5V to 5.5V. If I need to run max232 with 5V why it works with 3V3 with STM32?

Children
  • "In Max232 datasheet the supply voltage is in range of 4.5V to 5.5V. If I need to run max232 with 5V why it works with 3V3 with STM32?"

    When you operate anything outside its specified limits, the behaviour is undefined.

    That means it could do absolutely anything at all - without any apparent rhyme, reason, consistency or repeatability.

    You could say you just got "lucky" (sic) in the STM32 case - or you might consider it unlucky, as it led you to the false conclusion that everything was fine...

  • "In Max232 datasheet the supply voltage is in range of 4.5V to 5.5V. If I need to run max232 with 5V why it works with 3V3 with STM32?"

    Isn't that obvious?

    Because the two processors - when powered by 3.3V - may have slightly different high voltage levels for their ouputs. And different high voltage detection levels for their inputs. So one of them might just manage to get your MAX232 to correctly detect a high logic level while the other processor can't.

    Why do you think the world got transceiver chips designed for 3V3 use? The 5V transceivers were designed before the world moved towards 3V3 for microcontrollers.

    You should never have been in this situation in the first place, because you should never have designed the product without having walking through the datasheet for all used chips and then verified what supply voltages they support and what signal levels they support and supply. Your design is broken - so it isn't strange when you get bad results.

    Note that many processors have one set of documentation intended for the hardware designer. It focuses on voltages, temperatures, currents, rise/fall times etc. Then another document for the software developer, that describes registers etc. If you design hardware, then you need to walk through the hardware documentation before selecting which components to use.

    The data sheets are contracts. The manufacturer documents what they promise to deliver to the customer. If you violate the rules of the contract, then you can't expect the products to deliver the service that was documented in the contract. You broke your side of the contract, so the manufacturer/chip is free to break their side of the contract.

  • That means it could do absolutely anything at all - without any apparent rhyme, reason, consistency or repeatability.

    Anything at all??? Looks like you're in the realms of fantasy again.

    Even though I've had a large electrolytic capacitor fly past my ear when connected the wrong way round (actually, more than once), it's highly unlikely that an RS232 chip is going to spontaneously morph into an irresistible virgin when driven from too high a voltage.

  • OK, Thanks All.
    Reasonable enough to be convinced.

  • it's highly unlikely that an RS232 chip is going to spontaneously morph into an irresistible virgin when driven from too high a voltage.
    first we are discussing running from too low a voltage. Second with too high a voltage the result is more likely a brick than a 'virgin'

  • Hyperbole:

    So when a paid code reviewer says that your code is a pile of cow excrement, they probably mean to say that they noticed a typo in a comment.

  • "So when a paid code reviewer says that your code is a pile of cow excrement, they probably mean to say that they noticed a typo in a comment."

    No, I'd say Hyperbole is how that code reviewer described their skills before getting the job. Since it would be way better if the code reviewer managed a constructive report about what was found wrong and things to consider to improve the code.

  • No, I'd say Hyperbole is how that code reviewer described their skills before getting the job. Since it would be way better if the code reviewer managed a constructive report about what was found wrong and things to consider to improve the code.

    Seems reasonable. Also highly likely if that code reviewer calls himself a consultant ;)