Atxmega series controller programming...

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

Hello to all...
I am looking for programming xmega series controller....I found that it does't support SPI programming which I used to program atmega series controllers (From parallel port of pc to MISO,MOSI,SCK..).

Is there any way I can make my own programmer for xmega uC. Or I have to buy supported programmers???

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

Best bet is just to get a $34 AVRISPmkII which is the cheapest device (AFAIK) that does PDI.

(I'll move this to the Xmega forum)

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

Haven't these got a preloaded bootloader? Like 90USB or LPC ARMs?

No RSTDISBL, no fun!

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

Brutte wrote:
Haven't these got a preloaded bootloader? Like 90USB or LPC ARMs?

really !!!! that would be great but where to connect what for programming??????

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

AFIK, the Xmega has no bootloader. It is only USB chips that come with bootloaders.

Of course you could always ask a distributor / Atmel to pre-program your chips.

Otherwise buy an AVRISP-2 for PDI programming.

Else buy a Dragon, JTAGICE-mkII which will do both PDI and JTAG debugging.

David.

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

Quote:
AFIK, the Xmega has no bootloader.

I do not get it. Does Atmel imagine the memory filled with 0xFFFF is that interesting? It would be great if they downloaded just anything, like Bach.wav, "Hello world" or at least some blinking LEDs demo if a bootlader is that hard..

No RSTDISBL, no fun!

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

Many NXP devices come with an UART bootloader, even though they often go onto boards without RS232.

Atmel's T89C51xxx chips come with an UART bootloader.

Most USB enabled AVRs will end up on a USB board. Hence it is reasonable to expect an USB bootloader.

Yes. I quite agree. It would be no skin off of Atmel's nose to pre-program bootladers that will / can never be used.

However I expect that any 'requirement' for every board to have a RS232 or USB socket would upset more customers than it would please.

Even though Arduinos come with a foolproof bootloader, many people here are determined to trash them.

Incidentally, most 8051, ARM, etc devices with bootloaders have them in a private area of memory. Atmel AVR bootloaders are designed to be easily trashed.

David.

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

david.prentice wrote:

However I expect that any 'requirement' for every board to have a RS232 or USB socket would upset more customers than it would please.

Nobody is asking the pre-installed bootloader must be the unique way to program the avr!
The best is to have the choice: standard ISP/PDI or serial bootloader.

When you develop very small PCB with atmega, the ISP connector itself may occupy a large part of the board.

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

Quote:
However I expect that any 'requirement' for every board to have a RS232 or USB socket

I think that it is not a big challenge for an average Freak to write a universal bootloader which services 7 types of serial protocols (including osccal). Nobody suggested the requirement for USB or serial socket, but the PDI is actually a requirement in case of those strange XMegas as this is the only solution in most cases it seems.. As mentioned, you need to have a PDI socket (or a ZIF for production) to program these. As it is unlikely you use this socket for anything else, I do not understand why the chip is shipped with 0xFFFF filling the flash.

Quote:
    -"a: How could it be that most of our dear 90USB freaks do not buy our tools at all?" -"A: Lets not make the same mistake".
(Unfortunately PDI programming algorithm is public I think(unlike debugging)).

No RSTDISBL, no fun!

Last Edited: Tue. Jul 5, 2011 - 12:52 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

so nothing hand made could apply in this case...I have to buy any of above....................:(

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

There's a homebrew one here but it's nearly the same price as the AVRISP mkii.

http://tom-itx.dyndns.org:81/~webpage/commerce/commerce_index.php

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

Hi Gordon.

I've seen that product, but it is $34 USD, the same as the official Atmel product.

Atmel, for $34, includes the case and USB cable, is upgradable via AVR-Studio, and uses only one ribbon cable connector for ISP and PDI modes, the user doesn't have to move the connector about.

I'm all in favor of inexpensive tools, but Atmel has set the price point so low with the AVRISP mkII that it is truely hard to sell anything and make a profit which is equal to or better than the mkII.

Update: The fine print now notes that it is USB upgradable. I don't recall having seen that when I looked at this product before, (Ver 1), but perhaps I just missed it.

JC

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

All the Xmegas are SMD. So whereas Atmel or Farnell might pre-program them, the average Freak will not provide this service.

But if you want to avoid a PDI or JTAG header, you only have to ask Farnell. I doubt that they charge much for a large order. Possibly gratis!

Somehow I would be sceptical about the AVR user mentality. An UART bootloader on USARTC that neds a FTDI or MAX232 chip to work ???

NXP customers will happily buy ARM-7 chips and never use the bootloader. (I do not even know or care whether the M3 or M0 parts have bootloaders). It is pretty slow anyway.

So Atmel could provide the bootloader that is never used. They would suffer an awful lot of grief from users that want to use it via LPT, RS232, USB ... regardless of practicalities. You only have to read the posts on this forum.

David.

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

david.prentice wrote:
Somehow I would be sceptical about the AVR user mentality. An UART bootloader on USARTC that neds a FTDI or MAX232 chip to work ???

Not true.
In many case I use a simple TTL serial, so no need for other ICs.

In other situations I already have a FTDI or MAX232 so why add the ISP too?

Quote:
So Atmel could provide the bootloader that is never used.

You could never use it! I always use a bootloader.

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

Quote:
They would suffer an awful lot of grief from users

and 0xFFFF always satisfies their customers.
In such case there is something wrong with their customers it seems.
Mind AVRButterfly has a preloaded bootloader with level shifter (2 caps, 2 transistors and 4 resistors IIRC, if you really have stock problems with max232) and it works out of the box with a simple piece of three wires. Not very complicated, isn't it? Anyway USART is a must have with AVRs and other embedded stuff.

In the subject of bit-banger for 37$+shipping, I must tell you FT232H chip runs the JTAG clock at up to 30MHz, has 40MB/s parallel transfer rate and costs under 2,5$. Not mentioning it debugs all ARMs with pin count>33. What did they put into that AVRISPMkII to sell it for 37$? Let me guess, 250MHz ARM9 with 200kB of RAM?

I have tried Dragon once. 50$ Disaster with USB.

No RSTDISBL, no fun!

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

Quote:
In many case I use a simple TTL serial, so no need for other ICs.

I think that that is my point. There is no 'one size fits all'.

Modern PCs do not have a TTL o/p. They do not have RS232 either.

People go to great lengths to avoid resistors, zeners, capacitors. In fact anything to avoid the whole $34 of an AVRISP-2.

In contrast a PicKit2 or PicKit3 will program all Flash PICs and do simple debugging too for about the same price. ARM tools are given away free!

But for this privilege, you need a header like an AVR does for ISP, PDI or JTAG. If it is so important to avoid the cost/space of this header you need a OTP chip or a bootloader. Ask your distributor.

Incidentally, it is probably quite possible to bit-bang a PDI. I have no inclination to investigate. It seems simpler to just pay your money and buy a supported programmer. Or your time (and sweat) is worth less than $34 to write your own programmer.

David.

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

Quote:

it is probably quite possible to bit-bang a PDI

I think Dean has done this in LUFA - doesn't he have "bridge" code that goes into the 1287 and PDIs the Xmega on the Xplain?

EDIT: yup, thought so:

:\LUFA101122\Projects\AVRISP-MKII\Lib\XPROG[i386_vc]>dir
Volume in drive E is VBOX_linux
Volume Serial Number is 0000-0805

Directory of E:\LUFA101122\Projects\AVRISP-MKII\Lib\XPROG

7/04/2011  14:55              .
7/04/2011  14:55              ..
7/11/2010  00:14             9,766 TINYNVM.c
7/11/2010  00:14             2,849 TINYNVM.h
7/11/2010  00:14            17,333 XMEGANVM.c
7/11/2010  00:14             5,247 XMEGANVM.h
7/11/2010  00:14            14,475 XPROGProtocol.c
7/11/2010  00:14             4,609 XPROGProtocol.h
7/11/2010  16:46             6,147 XPROGTarget.c
2/11/2010  16:24             4,208 XPROGTarget.h
              8 File(s)         72,826 bytes

I have a strong suspicion that the "TINY" files may do TPI too ;-)

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

I have never looked at Dean's PDI code. I assume that he uses the USART of his AT90USB to implement the PDI.

Bear in mind that the OP wants to bit-bang the LPT port of his PC. He is probably not prepared to level-convert to 3.3V either.

So he would have to write a whole PC side bit-bang program that implements synchronous USART comms.

IMHO, you could probably do the low-level protocol very easily with an AVR (or any MCU). You would have to interpret the high-level stk600 or avrisp-2 commands via some other i/f.

In other words, it begins to get complicated. But one thing is certain. You need more components than a 5V LPT dongle.

David.

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

LPT is TTL compatible. It can sink/source about 15mA per IO and the threshold high level input is below 2,5V (can be moved 0,7V down with a single si diode, if needed). A simple LPT bitbanger can program a 3V AVR without problem (avrdude).

Anyway, if it is intended for production, then AVRISPMkII or Dean's clone is the choice. But if for development or learning AVRs, then keep away from programmers!

No RSTDISBL, no fun!

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

Looking at using an Atxmega64D3, will my STK500 program this chip?

Thanks in advnace

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

Hi Steve,

Welcome to the Forum.

Unfortunately, no, the STK500 will not program Xmegas.

The Xmega's use a new interface, "PDI", which the STK500 does not support.

The lowest cost option for PDI programming right now appears to be the Atmel AVRISP mkII, at $34 USD. This small programmer is a GREAT DEAL. You can use it to program the vast majority of AVR chips using ISP and PDI interfaces. (It is not a JTAG debugger, however, which is an issue for some people.)

Get one.

Highly recommended.

The next option is the STK600.

JC

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

Yes. I am sure that it will be fine.

Bear in mind that the AVRISP-2 is the Atmel branded product. It contains level translators and protection circuitry. Most importantly it has a plastic case. Atmel will provide updates for its own products.

I guess that the LUFA library will be kept up to date over the years unless Dean gets bored. I do not know what protection circuitry it has.

One day you will want /need to do JTAG / debugWire debugging. A Dragon will do everything.

David.