go_away

Author Topic: UART ... weird issues  (Read 1570 times)

0 Members and 1 Guest are viewing this topic.

Offline dshellerTopic starter

  • Full Member
  • ***
  • Posts: 72
  • Helpful? 0
UART ... weird issues
« on: May 30, 2008, 01:16:05 AM »
So I followed the tutorial on this site regarding setting up everything for the microcontroller, and it works... but only when the programmer is hooked up. So I did some more testing, and only the Ground/Vcc pins are necessary to be plugged in for the UART to talk to hyperterminal. So I brought my oscilloscope out, and noticed that as long as ground from my breadboard is hooked to ground to the oscilloscope, the UART works again -- removing the connection causes it to fail.

I am using the sparkfun rs232 shifter board, atmega168 with an external crystal at 20 MHz. So I have no idea what's going on, any one with some good ideas?

Offline bens

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 331
  • Helpful? 3
Re: UART ... weird issues
« Reply #1 on: May 30, 2008, 01:50:02 AM »
It sounds like you are trying to make two components talk to each other without giving them a common ground.  When you are using the oscilloscope or programmer, you are shorting their grounds together, at which point they are able to communicate.  Is it possible that's what's going on?

- Ben

Offline dshellerTopic starter

  • Full Member
  • ***
  • Posts: 72
  • Helpful? 0
Re: UART ... weird issues
« Reply #2 on: May 30, 2008, 08:00:03 AM »
I considered the same myself, but the adaptor I am using has Vcc / Gnd on the board. The Gnd should be common to my laptop and breadboard as it is on the board... right? I'm using the same adaptor that Admin uses if that helps any.

Offline dshellerTopic starter

  • Full Member
  • ***
  • Posts: 72
  • Helpful? 0
Re: UART ... weird issues
« Reply #3 on: May 30, 2008, 09:53:26 AM »
I just had a thought to check the connection between Gnd on the adaptor board and GND on the DB9 connector... that would be pin 9 correct?

Offline bens

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 331
  • Helpful? 3
Re: UART ... weird issues
« Reply #4 on: May 30, 2008, 02:43:35 PM »
Ground is pin 5 on the DB9 connector.  See the top picture on the the following page:

http://www.pololu.com/picture/view/0J290


- Ben

Offline dshellerTopic starter

  • Full Member
  • ***
  • Posts: 72
  • Helpful? 0
Re: UART ... weird issues
« Reply #5 on: May 30, 2008, 04:52:05 PM »
Looks like that was the issue, the trace from supply ground to DB9 pin 5 was messed up, so I just jumpered a wire across, looks ugly but works =)
Thanks for the help!

 


Get Your Ad Here

data_list