SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By TheFallen93
#102914
Well I've followed the first few beginning embeded electronics tutorials on the ATMega168 without any problems. I recently decided to mess around with UART, so I followed tutorial 4 to get my max232 working, then moved on to tutorial 5. But thats where I am having problems. I've double checked my wiring against the schematic and it's all correct. All I did from tut 4 to tut 5 was hook the rx/tx lines from my atmega168 to the rx/tx lines of the max232 like the tutorial says to. But no matter what I do I don't get any output in hyperterminal. I've double checked the rx/tx lines with a meter, and noticed that when my atmega168 outputs a message using the tutorials source code, the tx line will spike high, but the rx line is always low no matter what. Could this be the problem?
By esklar81
#102925
TheFallen93,
Let's start with the obvious:
  1. Did you wire (Tx-Tx, Rx-Rx) or (Tx-Rx, Rx-Tx)?
  2. If you disconnect the Tx and Rx lines, does it behave as it did before you connected them?
  3. Can you communicate in the other direction?
  4. What do the RS232 lines do when you send signals from the Atmega to the MAX232?
  5. Do you know the MAX232 to be functional?

If you'd like further help, please post a link to the tutorial, as I don't know to which one you're referring.

TIA,
Eric
By TheFallen93
#102927
Thanks for replying!
  • 1. I wired it Tx-Tx, Rx-Rx.
    2. If I disconnect the lines it does behave normally.
    3. If I short the rx/tx lines on the max232, I receive what ever I type in hyperterminal right back as normal.
    4. The tx line from the atmega gets pulled high, but the rx line is always low no matter what.
    5. Like I said before, if I short the rx/tx lines on the max232, I receive the text I send through hyperterminal right back, so I believe it to be functional.
I think the rx line never getting pulled high is the problem?
By esklar81
#102928
TheFallen93 wrote:Thanks for replying!
You're welcome
TheFallen93 wrote: 1. I wired it Tx-Tx, Rx-Rx.
Please list the pin numbers on each of the chips, based on a physical inspection of your circuit, not on the instructions.
TheFallen93 wrote: 3. If I short the rx/tx lines on the max232, I receive what ever I type in hyperterminal right back as normal.
Which pins (by number) are you shorting?
TheFallen93 wrote: 4. The tx line from the atmega gets pulled high, but the rx line is always low no matter what.
What I was trying to ask is: If you disconnect the MAX232 from the computer serial port, but leave it connected to the Atmega168, what do the lines on the RS232 side of the MAX232 do?
TheFallen93 wrote: I think the rx line never getting pulled high is the problem?
Why would you expect the rx line to be pulled high? Have you been sending text from Hyperterminal? If not, how about trying it, with the MAX232 rx line disconnected and with it connected to the Atmega?

Lastly, I suggest you read through the comments on Tutorial 4, particularly those about configuring software vs hardware control.

Good Luck,
Eric
By 60amp_relay
#102957
Just a quick thought, have you turned off Hardware Flow Control on the serial port? I've tripped on that little detail several times.