cancel
Showing results for 
Search instead for 
Did you mean: 

Weired inverting problem

iozho
Associate II
Posted on April 23, 2011 at 07:45

Weired inverting problem

#rs232-transceiver #rs232
6 REPLIES 6
iozho
Associate II
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

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.
iozho
Associate II
Posted on May 17, 2011 at 14:32

Hi Neil,

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

Thanks,

Konstantin

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...
iozho
Associate II
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

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...!!