go_away

Author Topic: Uart startup problem/programmer  (Read 2376 times)

0 Members and 1 Guest are viewing this topic.

Offline flimflapTopic starter

  • Jr. Member
  • **
  • Posts: 18
  • Helpful? 1
Uart startup problem/programmer
« on: May 28, 2008, 03:50:08 AM »
I got a really weird problem. I'm using the basic $50 robot with a crystal, a atmega 168 and a fdti chip for usb communication to the computer. The setup actually works but only when I have the programmer for the avr connected! As soon as i disconnect the programmer, i don't get any data at all. If i reinsert the programmer, the data continues.
I tried resetting the avr when the programmer was disconnected but it didn't work.
Anyone got any ideas?

Offline SixRingz

  • Full Member
  • ***
  • Posts: 76
  • Helpful? 0
  • Bit's and pc's = Robot.
Re: Uart startup problem/programmer
« Reply #1 on: May 28, 2008, 06:09:51 AM »
How is the programmer connected? Via USB? Make sure all drivers for the FTDI chip are properly installed.
Grounding things properly means burying them in the backyard...

Offline flimflapTopic starter

  • Jr. Member
  • **
  • Posts: 18
  • Helpful? 1
Re: Uart startup problem/programmer
« Reply #2 on: May 28, 2008, 11:34:25 AM »
The programmer is indeed a usb to atmel iscp thingy i got from ebay. The drivers for the ftdi are properly installed. All works well untill i unplug the programmer from my avr board

Offline bens

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 332
  • Helpful? 3
Re: Uart startup problem/programmer
« Reply #3 on: May 28, 2008, 11:43:20 AM »
Two potential explanations:

1) You don't have a pull-up on your mega168's reset line, so the programmer is functioning as your pull-up and allowing your mega168 to run.  When you disconnect the programmer, the board randomly resets.  I've seen this happen before.

2) You are inadvertently powering your mega168 via your programmer (one of the ISP lines is Vcc) and are inadequately powering your mega168 otherwise, so it only has the power it needs to run while your programmer is connected.  I expect this is not the case, but why not mention it?


- Ben

Offline flimflapTopic starter

  • Jr. Member
  • **
  • Posts: 18
  • Helpful? 1
Re: Uart startup problem/programmer
« Reply #4 on: May 28, 2008, 01:56:21 PM »
The battery has enough power. I let a led blink when its sending data. It's blinking when the programmer is disconnected. The board has worked on other projects. I added a pull up resistor and it's doing exactly the same. A pull up is just a 10K between reset and vcc right?

Offline bens

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 332
  • Helpful? 3
Re: Uart startup problem/programmer
« Reply #5 on: May 28, 2008, 03:14:57 PM »
Yeah, the pull-up would just be a 10k to Vcc.  I guess one thing I should ask you to clarify: when you say "with the programmer disconnected", do you mean disconnected from your mega168 or disconnected from the PC?


- Ben

Offline flimflapTopic starter

  • Jr. Member
  • **
  • Posts: 18
  • Helpful? 1
Re: Uart startup problem/programmer
« Reply #6 on: May 29, 2008, 03:12:36 AM »
disconnected from the atmega. I've put a fresh 9V battery in and still no go. Any other suggestions?

Offline flimflapTopic starter

  • Jr. Member
  • **
  • Posts: 18
  • Helpful? 1
Re: Uart startup problem/programmer
« Reply #7 on: May 29, 2008, 03:37:07 PM »
did some more testing..

Added a LED that blinks every 0.5 seconds and then send three zero's. With the programmer connected the led blinks steadely and i recieve my data. With the programmer the led blinks 4-5 times then a really short blink and then begins all over again and i recieve no data at all.
When i disconnect the programmer and the 2 uart lines from the board everything blinks just fine.
I tried another board i had lying around with a atmega 168 on it and i have excately the same problem. The first board was used for the $50 robot and was working very well with the photovore code.

Just popped in my mind.. do the fdti chip and the atmega have to be connected on the same power supply???

Offline flimflapTopic starter

  • Jr. Member
  • **
  • Posts: 18
  • Helpful? 1
Re: Uart startup problem/programmer
« Reply #8 on: May 29, 2008, 03:48:22 PM »
guess the DO have to be on the same power supply! it's working now!! thanks for all the trouble guys

 


Get Your Ad Here

data_list