Skip to main content
iozho
Associate II
April 23, 2011
Question

Weired inverting problem

  • April 23, 2011
  • 6 replies
  • 969 views
Posted on April 23, 2011 at 07:45

Weired inverting problem

#rs232-transceiver #rs232
    This topic has been closed for replies.

    6 replies

    Andrew Neil
    Super User
    May 17, 2011
    Posted on May 17, 2011 at 14:32

    You do have an RS232 Transceiver, don't you?

    Note that RS232 uses bipolar voltage levels - nominally +/-12V.

    Therefore, you need an RS232 ''Transceiver'' to convert between a microcontroller's unipolar logic level (~3V for STM32) and RS232.

    The transceiver inverts the signals.
    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    iozho
    iozhoAuthor
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 14:32

    Ok I have found what the problem is : see here 

    http://stackoverflow.com/questions/2633715/uart-speed-possibly-wrong

     . So I am connecting USART3 to rs232 and that why the things get inverted. Now I have tried to use only UART4 but still the same problem. Is RS232 supported at all?

    Thanks,

    Konstantin

    Andrew Neil
    Super User
    May 17, 2011
    Posted on May 17, 2011 at 14:32

    ''I am just using simple PC port to connect to nothing special''

     

    There is nothing ''special'' about an RS232 Transceiver - it is perfectly normal & standard and

    must

       be used whenever you want an RS232-to-logic-level interface.

    If you have connected the RS232 output from your PC's COM port directly to a pin on the STM32, then it is quite likely that you have blown-up the pin!

    If you look at the schematics of any devboard with an RS232 connection, you will see an RS232 transceiver being used.

    The MAX232 is a favourite RS232 transceiver for 5V systems; for 3V (such as the STM32), see MAX3232

    http://www.maxim-ic.com/datasheet/index.mvp/id/1780

    Equivalents, Alternatives, and Substitutes are also widely available from many other manufacturers...
    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    iozho
    iozhoAuthor
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 14:32

    Hi Neil,

    I am just using simple PC port to connect to nothing special.

    Thanks,

    Konstantin

    Andrew Neil
    Super User
    May 17, 2011
    Posted on May 17, 2011 at 14:32

    ''Ok I've missed that tiny (sic) part''

     

    That's ''tiny'' in the same sense that ensuring you have a workign parachute is a ''tiny'' part of jumping out of an aeroplane...!!

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    iozho
    iozhoAuthor
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 14:32

    Ok I've missed that tiny part. It is true I have connected directly to the controllers pin - did not realize that I need additional IC. Thanks for the help.

    Thanks,

    Konstantin