usb bootloader avr

Go To Last Post
21 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi i am making a doard for my xmega128a1 i made a power supply 0v-5v with LM7805/TO, the crystal, serial (usart) with RS232.And i want to program my avr in PDI mode.

But i want also to make a USB bootloader circuit without using ISP like the bootloader on STK600.What i need to do that?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

But i want also to make a USB bootloader circuit without using ISP like the bootloader on STK600.What i need to do that?


Until the USB enabled Xmega's appear (I've only heard one rumour so far) you are going to need something external to do USB. That external (at least for tiny and mega) that almost everyone uses is an FTDI T232R. On the AVR facing side it's simply a UART and on the PC facing side it's a CDC-ACM, in other words a virtual COM port. It's then easy to implement a bootloader - in fact almost all existing bootloaders are built for UART so just use one of those - the AVR need know nothing about the fact it's actually being transported over USB. On the PC you can even just use a standard PC terminal program or perhaps avrdude or something like that.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
i am making a board for my xmega128a1 i made a power supply 0v-5v with LM7805

---> NO <--- !!!

I wish I knew how to make my post red, but atlas...

XMegas run on 3 V, NOT 5 V.

Also, when you select a 3 or 3.3 V regulator, look closely at the specifications in the regulator's data sheet for the output capacitor.

For the old 7805s one could use just about anything.

Not so for the 3.3 V regulators, which may have specific requirments on the size of Cout, and on its ESR rating.

Good luck with your board, it sounds like a fun project.

JC

[cliff: added color and size for you]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks a lot for your help.

@ clawson Do you mean something like that?

https://github.com/adafruit/FTDI...

@ DocJC thanks i will had a BIG problem

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Do you mean something like that?

Yes.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
[cliff: added color and size for you]

I don't need the color changed, but if you can add size... :lol:

"I may make you feel but I can't make you think" - Jethro Tull - Thick As A Brick

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

giwrgos,

Look at this, it works great.

http://www.adafruit.com/products...

They sell extremely well and are great LUFA based AVRISP mkII clones and virtual serial ports.

"I may make you feel but I can't make you think" - Jethro Tull - Thick As A Brick

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks larryvc.
That circuit https://github.com/adafruit/Atmega32u4-Breakout-Board/raw/master/atmega32u4bbsch.png
should i use it as bootloader in my xmega dev-board?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

giwrgos wrote:
should i use it as bootloader in my xmega dev-board?

giwrgos, I'm a little confused.

Could you please explain, in more detail, exactly what it is that you are trying to do? Explain your first post.

That board I showed you can be programmed to be an AVRISP mkII Clone programmer. It will allow PDI programming. I don't understand your question.

"I may make you feel but I can't make you think" - Jethro Tull - Thick As A Brick

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius

Last Edited: Fri. Jul 22, 2011 - 05:05 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

should i use it as bootloader in my xmega dev-board?

If you have a PDI programmer why would you bother? Or is the plan to supply these boards to other people who may not have a PDI programmer?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

larryvc wrote:
giwrgos wrote:
should i use it as bootloader in my xmega dev-board?

giwrgos, I'm a little confused.

Could you please explain, in more detail, exactly what it is that you are trying to do? Explain your first post.

That board I showed you can be programmed to be an AVRISP mkII Clone programmer. It will allow PDI programming. I don't understand your question.

Maybe i am also a little confused about the meaning of "to program an avr" via PDI or ISP or JTAG and the way that you can do that. If i use STK600 I will write my code and then I will connect the STK600 by usb and then I will program my avr and also i will check that my program mode will be PDI with the correct connection on the STK's pins. If I want to do the same thing on my new homemade board what i will need? What is the circuit and the logic that STK600 use to program an avr via usb?Will I need an AVRISP mkII?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

If I want to do the same thing on my new homemade board what i will need?

Expose the PDI signals on your own board
Quote:

What is the circuit and the logic that STK600 use to program an avr via usb?

You run the PDI signals from the STK600 to your own board
Quote:

Will I need an AVRISP mkII?

Whatever for? The STK600 is just as good a PDI programmer as the AVRISPmkII is.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think your translation or definition of the word bootloader is incorrect. If you thought it meant programmer you were wrong.

"I may make you feel but I can't make you think" - Jethro Tull - Thick As A Brick

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

larryvc wrote:
I think your translation or definition of the word bootloader is incorrect. If you thought it meant programmer you were wrong.

No i know that is not the same thing.Bootloader is to insert the code in the avr right? But what is exactly a programmer?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No, you do misunderstand the two terms.

A bootloader is code already on the avr that will allow the avr to act as a programmer and allow you to load new application code into the AVR.

A programmer is a tool that is used to load code into the AVR. Some programmers are USBasp, AVRISP mkII, USBprog, USBtinyISP, etc.

The STK600 will also let you program the avr.

"I may make you feel but I can't make you think" - Jethro Tull - Thick As A Brick

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So i will not need a programmer because xmega has bootloader? So what i will need to load the code to the xmega if i hadn't stk600? give me a schematic as an example if is that possible.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think we could use some helpful input from some other xmega knowledgeable forum members to help explain this better.

"I may make you feel but I can't make you think" - Jethro Tull - Thick As A Brick

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok thanks a lot Larry for your help.If you know any specific member that can help send me a pm with the name.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The current crop of XMegas do not come with a bootloader. As such, you currently program via the PDI pins, and you MUST use a hardware based programmer (i.e. your STK600, a JtagIce MKII, a Dragon, etc.) to translate from the PC USB (or serial port) to the signals that the PDI pins require. That is what your STK600 is doing... translating for you.

If you load bootloader code onto the XMega, you no longer need a hardware based programmer- all you need is a UART to USB adapter, and use special software on the PC side that can communicate with the bootloader software on the XMega and DL/UL the code. When you reset any bootloader equipped AVR, it will usually immediately launch your own application code unless a special button sequence is pressed during power-up- at this point the bootloader will patiently await the PC to start sending a hex file (or requesting a hex file).

SO- an AVR equipped with bootloader firmware only requires a serial or USB cable (depending on the bootloader implementation, it will require that USB cable be a USB->UART adapter). An AVR that does NOT have bootloader firmware requires a hardware programmer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

(i.e. your STK600, a JtagIce MKII, a Dragon, etc.)

Just to note that the cheapest Atmel programmer that can do PDI is the $34 AVRISPmkII but it's probably better to spend the additional $16 to get a Dragon so you can debug as well as program the Xmega chips.