ATMega or XMega

Droopy
Benutzer
Avatar
Gender:
Age: 58
Posts: 24
Registered: 01 / 2016
Subject:

ATMega or XMega

 · 
Posted: 01.02.2016 - 17:23  ·  #1
I'm developing for years with AvrCo and AVR controllers. My last project uses a ATMega2560 on14MHz. With 75% memory use, I still have enough run time power.

Now i've to develop a battery powered handheld device and I was thinking of using a newer type like the XMega256A3U. But my question is : will it bring improvement?
- The XMega can run faster (32MHz) than the ATMega (20MHz), but when running on e.g. 14MHz, will the XMega consume less power than the ATMega 2560 on 14MHz?
- I will need peripherals like serial and spi bus, but uses Avrco the advantage of the DMA inside the XMega to minimize cpu run time ? If so, I maybe can run on a lower frequency using less power.
Dma also preserve cpu power, time I can use to do other things. Maybe I can get the xmaga faster a sleep.

Thanks for some info.
Harry
Moderator
Avatar
Gender:
Location: zwischen Augsburg und Ulm
Age: 59
Posts: 2134
Registered: 03 / 2003
Subject:

Re: ATMega or XMega

 · 
Posted: 01.02.2016 - 23:09  ·  #2
The XMega can run @ 60MHz ;)
Harald_K
 
Avatar
 
Subject:

Re: ATMega or XMega

 · 
Posted: 01.02.2016 - 23:16  ·  #3
for considerations about power consumption versus frequency, i would take a look in the datasheets of the selected types of the Atmega or Xmega-controllers. maybee the lower Vcc will save a little bit of power, because power consumtion is almost made by internal capacitances , frequency and voltage.


physically spoken P = 1/2 * C * U^2 with P = Energy in Capacitor in Joule (or Watt*seconds), C = capacity in Farads and U = Voltage - as the voltage is squared, the influence of this will make the biggest effect - the power consumtion then is computed as Watts = Energy * Frequency which means the power consumtion rises liearly by frequency and squared by voltage ...

if you want to know about usage of special CPUfeatures - just change the processor type and look in the generated assembly code.

my personal hint: never touch a running system ;)
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: ATMega or XMega

 · 
Posted: 02.02.2016 - 14:01  ·  #4
Hello Droopy,

the XMega is the winner, in power consumption and price!

Code
Mega256 @16MHz  operating 23mA
                idle 5.5mA
XMega256 @32MHz operating 10mA
                idle 1.8mA
                sleep <10uA

The AVRco doesn't direktly support DMA operation.
But this should be no problem for an experienced user.

rolf
Droopy
Benutzer
Avatar
Gender:
Age: 58
Posts: 24
Registered: 01 / 2016
Subject:

Re: ATMega or XMega

 · 
Posted: 16.02.2016 - 23:44  ·  #5
Sorry for the late reply : I was checking a lot of stuff for the new project;)
Thanks for all information. I will go for the newer XMega.

Most components i need for this new project are clear, but for instance the display choice isn't clear yet.
Till now we used 7 segment displays (4 pieces) because the instrument is used in harsh enviroments (dust, moisture, falling on ground) and must have a very good readability (in dark as well as sunshine). The disadvantage is that you can't have text on it, for instance for parameter settings. Therefore I was wondering if a 2.4'' graphical OLed displays is an option? I could show big numbers on the display while measuring and several lines smaller text when setting parameters. I think they are consuming less power from my batteries and are good readable. But are they also strong enough? Another issue is driving those displays. You have displays with SPI bus, that's no problem, but if you need to make a full driver for several sizes of text on a SSD1305 controller, it take some time to get it right.
Harry
Moderator
Avatar
Gender:
Location: zwischen Augsburg und Ulm
Age: 59
Posts: 2134
Registered: 03 / 2003
Subject:

Re: ATMega or XMega

 · 
Posted: 17.02.2016 - 08:26  ·  #6
Use a transflektive LCD, e.g. DOG-series from EA. At sunshine an OLED is not so good and the lifetime is limited.
Droopy
Benutzer
Avatar
Gender:
Age: 58
Posts: 24
Registered: 01 / 2016
Subject:

Re: ATMega or XMega

 · 
Posted: 01.06.2016 - 12:34  ·  #7
It's again some months ago I replied. So a state of the project ;)
During these months we evaluate the whole project and just started developing some prototype hardware.
About the hardware : we will use the XMega2563au. We tested the DOG serie displays but they were not usable for us : the viewing angle and brightness was not what we expected. Therefor the decision is made to go for a graphical OLED 128x64 display with SSD1325 controller. At the moment we are testing some mounting variants to find out if the display is robust enough for our application.
At the moment I’m starting to look for available drivers, just for not finding out the wheel again.

We will use the OLED SSD1325 with the SPI interface : I found some examples for the SSD1305 but is there also already a working example for the SSD1325. The mean difference I understood are the 16 gray levels (something we will probably not use). Does someone has experience how much the load is on the AVR with the LCDGraphic and character import.
We will only display some text and numeric results (lets assume an update time of 250msec).

Another maybe stupid question: the XMega has on a lot of ports, for instance port E, one SPI port and two COM ports. Every COM port can be set as SPI master. So what is the difference, what is better to declare or is it all the same:
THIS:
MSPIorder_E0 = LSB;
MSPImode_E0 = 3;
MSPIpresc_E0 = 1;
MSPI_SS_E0 = none;
{-----}
SPIorderE = MSB;
SPImodeE = 0;
SPIprescE = 0;
SPI_SSC = none;

OR THIS:
MSPIorder_E0 = LSB;
MSPImode_E0 = 3;
MSPIpresc_E0 = 1;
MSPI_SS_E0 = none;
{-----}
MSPIorder_E1 = MSB;
MSPImode_E1 = 0;
MSPIpresc_E1 = 0;
MSPI_SS_E1 = none;

Thanks a lot ;)
Harry
Moderator
Avatar
Gender:
Location: zwischen Augsburg und Ulm
Age: 59
Posts: 2134
Registered: 03 / 2003
Subject:

Re: ATMega or XMega

 · 
Posted: 01.06.2016 - 12:52  ·  #8
Example for a display with SSD1322. This controller needs 2 bytes for 8 pixels. The SSD1325 needs presumably 4 bytes? At the example you can see how it works. topic.php?t=2803

War das englisch gesehen richtig???

Gruss
Harry
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   137   151 · Page-Gen-Time: 0.113363s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI