Atxmega Series development

Hi,
I was thinking on the lines on why there wasn't any rush for arduino compatible Atxmega series of boards like Atxmega128a3u?(Is it due to Arduino Due?)
I was wondeing whether I could give it a go on this for the next couple of months. I started googling and found this item. Seems that someone has already worked on this.

http://www.ebay.com/itm/2012-new-Renault-CAN-Clip-newest-version-V120-lowest-price-/180922744611

So my question is how is this developed? I mean how do you go about porting a new series of chips to arduino compatible ones? Can anyone shed any light on this issue? Because I would like to go down to the details on how this is being done. What are the steps involved?

From my understanding, (forgive me if I am totally wrong on this one) I have to write a new bootloader for the Atxmega128a3u and I am done with it? Will all the things work (All libraries) as with say a normal MEGA board? (Or is some porting required? If so how?)
If this is the case how hard (in terms of programming) is it to write a bootloader?

Hoping someone can answer these questions..
Thanking you guys in advance :slight_smile:

Can anyone give a start on where to begin in this ?

I was thinking on the lines on why there wasn't any rush for arduino compatible Atxmega series of boards like Atxmega128a3u?(Is it due to Arduino Due?)

Don't know. Other than the maximum voltage, that ATxmega128A3U is certainly nice.

You will need to program a new processor. According to the datasheet you have two choices: PDI or JTAG. Do you have a PDI / JTAG programmer?

Are you planning to develop the hardware and software?

Do you have a specific application in mind?

Will all the things work (All libraries) as with say a normal MEGA board?

I'm going to go with "no". The basic hardware appears to be significantly different (and more feature-rich).

Are you planning to develop the hardware and software?

hardware to be specific. I was wondering how to do software portion also. I wanted do something like Xaduino.

Do you have a specific application in mind?

Currently no. Thinking in some areas though. It has built in DACs too. Seems better to invest time in these chips for future anyway :slight_smile:

I'm going to go with "no".

Why is that? Is it because its a new line of chips? How to start off developing these to arduino compatible form?

1 Like

000:

I'm going to go with "no".

Why is that? Is it because its a new line of chips?

I only spent a few minutes with the datasheet so I could easily be wrong. It looks like the basic architecture is very similar or even identical (RISC; 32 registers; very similar instruction set) to the AVR. That's the good news.

However, all the peripherals (timers, ADC, etcetera) appear to be different. The essence of most Arduino libraries is to provide a simplified interface to a peripheral. If the peripherals are different the library will be different; meaning the library will have to be rewritten. That's the bad news.

How to start off developing these to arduino compatible form?

From my experience porting to ATtiny processors...

pinMode is always first. digitalWrite is always second. digitalRead is always third. millis or delay is always fourth. With those four functions you have the ability to perform crude debugging. If possible, Serial is next.

• Porting the Arduino API is a creative endeavor. You need to be prepared for a long-term commitment. There will be fits and starts as your brain works out how to solve a problem.

• Porting the Arduino API is an intimate endeavor. You need to have the hardware in one hand and the datasheet in the other. I keep a notebook where I can write down ideas and snippets of useful information.

• Porting the Arduino API is an incremental endeavor. Steal. Whenever possible, "steal" something that works. That is one of the biggest advantages open-source has over closed-source. Leverage that advantage.

Specific things...

• Ensure the toolset is ready. I believe the Arduino IDE ships with a compiler for the XMega processors. Make certain. Google will very likely be able to answer.

• Get the hardware.

You may want to spend some time with Google performing general searches. For example, this looks helpful...

http://blog.omegacs.net/2010/06/26/getting-started-with-xmega-differences-from-atmega-part-1/

Well written and well worth reading, thanks!

I have taken one or two quick looks at the XMEGA datasheets and they do look like interesting, powerful and useful chips. I have to wonder though, if they will get squeezed out of the market by low-end ARM offerings such as those that NXP has recently fielded. Which is not at all to say that the XMEGAs can't provide solutions that are just as effective or even more so.

I've only recently installed Atmel Studio and have only had time to blink some LEDs on AVRs with it. I wonder what it would take to get up to speed with Atmel Studio and the XMEGAs. (I'm also wondering the same thing relative to Atmel's ARM chips.)

Atmel Studio is fairly intuitive, especially if one has had some experience with Visual Studio. And AFAIK, it's not hobbled in any way. It really frosts me that the other MCU vendors play tricks like that. Just as one example, the free version of the LPCExpresso tool chain is C language only (no C++) and has code size limitations. Having said that, the LPC switch matrix is a very cool feature which addresses several of the issues mentioned in the link above regarding pin arrangement and alternate pin functions.

@Coding Badly Thanx for the tips :slight_smile:

• pinMode is always first. digitalWrite is always second. digitalRead is always third. millis or delay is always fourth. With those four functions you have the ability to perform crude debugging. If possible, Serial is next.

So it should basically be just re assigning of pins right? (I know you might not be able to answer unless you go through the datasheet properly)
My question is where do I edit these parameters from? (Sorry if I am being naive about it)

Finally I may not actually port it because I think people have already ported it here.

(Did anybody on this forum did the above porting?)
I just wanted to know what were the basic things you do for such a porting.

You may want to spend some time with Google performing general searches. For example, this looks helpful...

http://blog.omegacs.net/2010/06/26/getting-started-with-xmega-differences-from-atmega-part-1/

Yes. That was the link that first got me interested in the chip. :slight_smile:

I believe the Arduino IDE ships with a compiler for the XMega processors.

Shouldnt the compilers be the same?

000:

• pinMode is always first. digitalWrite is always second. digitalRead is always third. millis or delay is always fourth. With those four functions you have the ability to perform crude debugging. If possible, Serial is next.

So it should basically be just re assigning of pins right? (I know you might not be able to answer unless you go through the datasheet properly

Maybe. The pin configuration for XMEGA is more complicated but has lots of interesting features...
http://www.atmel.com/Images/doc8050.pdf

You may be able to reuse the bulk of the Standard Core implementation to get basic I/O working.

My question is where do I edit these parameters from? (Sorry if I am being naive about it)

The code is in wiring_digital...
https://github.com/arduino/Arduino/blob/master/hardware/arduino/cores/arduino/wiring_digital.c

There are some type definitions in wiring_private...
https://github.com/arduino/Arduino/blob/master/hardware/arduino/cores/arduino/wiring_private.h

The pin mapping is defined in pins_arduino...
https://github.com/arduino/Arduino/blob/master/hardware/arduino/variants/standard/pins_arduino.h

Finally I may not actually port it because I think people have already ported it here.

That is definitely worth looking over. (The download is horrendously slow. Snore.)

Bear in mind that is a Chinese website. It even appears to be sponsored by the Chinese government. Make absolutely certain your anti-virus software is up-to-date and try to avoid actually running anything from the download.

(Did anybody on this forum did the above porting?)

I haven't noticed anyone bragging about it.

I believe the Arduino IDE ships with a compiler for the XMega processors.

Shouldnt the compilers be the same?

It is indeed...

Some things about the download from http://www.obdiiworld.com/ ...

• The download took forever

• It's based on Arduino 1.0.1

• They use WinAVR 20100110 instead of 20081205

• pde.jar is different (that could be because Teensyduino is installed on my computer)

• Xaduino includes several libraries

• Xaduino includes a core (attached to this post)

• Webroot identified one threat in the download: .\arduino-1.0.1-windows-x\arduino-1.0.1\hardware\tools\avr\utils\bin\info.exe but Webroot has a tendency to generate false positives

xmegaduino.7z (28 KB)

See also GitHub - Xmegaduino/Xmegaduino: Xmegaduino fork of Arduino
There are quite a few hits on a web search for "xmega arduino."

Till relatively recently, the more interesting xMega chips have been plagued with availability issues and bugs :frowning:
Since the Arduino core, by it's nature, is unlikely to be able to take advantage of the fancy peripherals, about the only advantage of xMega is the 32MHz clock rate, which is pretty much "not compelling" for the effort required for a new core and new hardware (especially since ... ARM!) (ok, "big" xMega chips are now running lower cost than big MEGA chips...)

@Coding Badly Thanx for the info :slight_smile:
I am definitely going to take a look at those after this week :slight_smile: (Finals coming up this week..)

Since those guys have ported it might give that a go..

• Webroot identified one threat in the download: .\arduino-1.0.1-windows-x\arduino-1.0.1\hardware\tools\avr\utils\bin\info.exe but Webroot has a tendency to generate false positives

Thanx for the headsup :wink:

@westfw
Xmegaduino. I have seen it online(Couldn't go through it in detail though). Will give it a go soon...

about the only advantage of xMega is the 32MHz clock rate, which is pretty much "not compelling" for the effort required for a new core and new hardware (especially since ... ARM!) (ok, "big" xMega chips are now running lower cost than big MEGA chips...)

Built in DACs, 32Mhz, 128KB Flash memory, sufficient I/Os and I think its cheaper than ATmega2560. So thats what got me interested in this at the first place.

What I had in mind is something like a small portable oscilloscope with the Atxmega. But what happened was that a bit of googling made me land up on this 404 - Page not Found
:frowning: Kind of exactly what I had in mind(Except the display) :frowning:
Its kind of hard to innovative these days. :frowning:

Any ideas on something similar which I could improve/work upon on this?