go_away

Author Topic: USB to UART on multi-UART AVR  (Read 7116 times)

0 Members and 1 Guest are viewing this topic.

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
USB to UART on multi-UART AVR
« on: September 28, 2007, 08:44:00 AM »
I am wiring up a circuit for the ATmega2560.

My end goal is to use USB to bootload the ATmega2560.

USB -> CP2102 USB to UART adapter -> UART of ATmega2560

The problem I have however is that the ATmega2560 has four UART's! Would it matter which one I use? My guess is no . . .

Also, possibly related but not sure, what does WR (PG0) and RD (PG1) do on this AVR?

And what is the difference between the CP2102 and CP2103 other than the ~40% difference in price?

Offline JonHylands

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 562
  • Helpful? 3
  • Robot Builder/ Software Developer
Re: USB to UART on multi-UART AVR
« Reply #1 on: September 28, 2007, 11:58:47 AM »
I can answer the last question - the CP2103 has some (4, I think) general digital I/O pins that can be controlled.

I suspect which UART you use will depend on the bootloader.

- Jon

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: USB to UART on multi-UART AVR
« Reply #2 on: September 28, 2007, 12:35:31 PM »
ok, browsing around I found this:
http://www.ifas.htwk-leipzig.de/easytoweb/indexe.php?content=download

According to the manual, the software has "macros [that] allow the configuration of the data communication."

They have an example that shows me how to define which UART I want and baud rate using some form of GUI. Looks easy!

Just to make sure I understand this right, I upload the .hex bootloader using a programmer (MISO/MOSI stuff). Then to upload future programs, all I need to do is upload a different .hex using the UART, correct? Would I need to add anything to that second program, or can it run just as it was as if there wasnt a bootloader?

And I can use hyperterminal to upload the program while in bootload mode, right?

(only robotics can make me feel like a daily noob :P)

Offline JonHylands

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 562
  • Helpful? 3
  • Robot Builder/ Software Developer
Re: USB to UART on multi-UART AVR
« Reply #3 on: September 28, 2007, 02:10:52 PM »
How the second program is uploaded depends on the bootloader. Some of them work with the ASCII hex files directly, so you can upload from HyperTerminal. Some require a custom application (command line or GUI) to upload over the serial port.

- Jon

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: USB to UART on multi-UART AVR
« Reply #4 on: September 28, 2007, 02:13:47 PM »
If HyperTerminal doesnt work, I know how to use AVR Dude (command prompt). ;D

Offline Graynomad

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 7
    • Skype - grayn0mad
Re: USB to UART on multi-UART AVR
« Reply #5 on: December 06, 2010, 09:35:03 AM »
Quote
what does WR (PG0) and RD (PG1) do on this AVR?

This chip can address external memory, the RD and WR pins are used for that.
« Last Edit: December 06, 2010, 06:29:07 PM by Graynomad »
Scattered showers my arse -- Noah, 2348BC.

Offline GearMotion

  • Supreme Robot
  • *****
  • Posts: 489
  • Helpful? 24
  • Two decades+ of Embedded Design
Re: USB to UART on multi-UART AVR
« Reply #6 on: December 06, 2010, 12:23:29 PM »
Quote
what does WR (PG0) and RD (PG1) do on this AVR?

This chip can address external memory, the RD and WR pins are used for that.

______
Rob


Timely.

Offline Graynomad

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 7
    • Skype - grayn0mad
Re: USB to UART on multi-UART AVR
« Reply #7 on: December 06, 2010, 06:25:28 PM »
He he, yes I didn't notice the date until after hitting the go button. No matter, maybe the OP is still interested  :)


« Last Edit: December 06, 2010, 06:28:40 PM by Graynomad »
Scattered showers my arse -- Noah, 2348BC.

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: USB to UART on multi-UART AVR
« Reply #8 on: December 06, 2010, 06:35:36 PM »
He he, yes I didn't notice the date until after hitting the go button. No matter, maybe the OP is still interested  :)
lol yeap still interested. Funny thing is, I never did figure out what it was! thanks

 


Get Your Ad Here

data_list