Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: Admin 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?
-
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
-
ok, browsing around I found this:
http://www.ifas.htwk-leipzig.de/easytoweb/indexe.php?content=download
According to the manual (http://www.ifas.htwk-leipzig.de/easytoweb/download/AVR-Bootloader_user_guide_en_1_09_web.pdf), 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)
-
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
-
If HyperTerminal doesnt work, I know how to use AVR Dude (command prompt). ;D
-
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.
-
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.
-
He he, yes I didn't notice the date until after hitting the go button. No matter, maybe the OP is still interested :)
-
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