0

I am having difficulties sending the correct message to the hyper terminal from ATmega32 micro controller. For some reason, the MAX232 chip is giving undesirable voltage levels. I want it to give ±15 volts at the outputs. (Pin 14 and Pin 15). Using the virtual terminal I want to achieve the following result:

enter image description here

But I don't get the correct output with the following setup:

enter image description here

However, When I switch up pins 14 and 13 and place them at pins 3 and 2 instead, I get the correct voltage levels BUT there is obviously an error because they are connected incorrectly.

enter image description here

I get some weird message in the hyper terminal though despite this error as the picture below shows:

enter image description here

But Why won't the correct wiring i.e. where pin 14 (of the MAX232) connects to pin 2 and pin 13 to pin 3 work? Is it the capacitance values? Maybe my baud rate calculations are off? I tried using an op-amp to assist me with this problem and some NOT gates to no avail. Any advice?

JYelton
  • 32,302
  • 33
  • 134
  • 249
  • MAX232 is kind of obsolete since almost 30 years back - use MAX202 or similar, which has identical pin-out but doesn't require big caps. Not the cause of your problems but you shouldn't specify in ancient parts when doing new projects. – Lundin Aug 16 '23 at 07:29

1 Answers1

0

Correct pinning should be as in your lower schematic:

MCU UART Tx -> MAX232 pin 11 in -> MAX232 pin 14 out -> DB9 pin 3.
MCU UART Rx <- MAX232 pin 12 out <- MAX232 pin 13 in <- DB9 pin 2.
Also GND on DB9 pin 5 - important!

It is necessary to place a pull-up on the MCU Rx pin unless this is available internally.

You will need a "null modem" cable between your board and the PC.

I can't comment on Proteus since I don't use it.

Lundin
  • 17,577
  • 1
  • 24
  • 67