(added AVR and PIC tag -- I think it will be more like PIC vs. AVR story :-)) > ---------- Forwarded message ---------- > From: Isaac Marino Bavaresco > Date: Sat, Oct 31, 2009 at 2:21 PM > Subject: AVR Xmega > To: "Microcontroller discussion list - Public." > > > These days I was studying the AVR Xmega MCUs for prospective use in a > new product. When I learned their capabilities I freaked out! > > The facts I found more important: > a) 8-bit MCU approaching 32MIPS @ 32MHz. > b) Internal RAM from 2KB up to 32KB and flash from 16KB up to 384KB. > c) Packages of 44 (34 I/Os), 64 (50 I/Os) and 100 pins (78 I/Os) available. > d) The 100 pins versions have external memory interface, supporting up > to 16MB of SRAM and 128MB of SDRAM!!! > e) 4 DMA channels capable of transferring between any combination of > RAM/port/peripheral and the most amazing: external DMA requests available! > f) Any I/O pin may generate interrupts. > g) Operation from 1.6V up to 3.6V. > h) 5, 7 or 8 USARTS; 5, 7 or 8 16-bit TIMERS; 16, 22 or 24 PWMs; 2, 3 or > 4 SPI; 2 or 4 TWI; 12 or 16 12-bit A/D inputs; 2 or 4 12-bit D/A outputs. > i) Hardware crypto-engine with DES and AES support. > j) As all AVRs, every interrupt has its own vector. > > Prices from $4.30 up to $9.68 per unit and from $2.40 up to $5.40 per > unit in lots of 100. > > If only they had USB or Ethernet as options they would be perfect! > > For a previous project I needed a MCU with external DMA request and the > only I found was a Samsung ARM9 (very hard to obtain, including > documentation). I ended up with an Atmel ARM9 without external DMA > request but with an image sensor interface. > > Some time ago someone asked for a MCU with image capture capabilities. > One of these Xmega with external RAM and this external DMA request may > be able to capture from a CCD without any support chip. It is a pity > they are only 8 bits. > > Another great thing is that development tools are free: WinAVR (gcc) and > for programming any JTAG device supported by AVRDUDE will work. The down > is that debuggers are expensive (around $600). > > Isaac > __________________________________________________ > First of all, as you may know MIPS also known as Meaningless Indicator of Processor Speed. Meaningless as it does not reflect what can you do in 1 instruction. For example in AVR architecture you just cannot use arithmetic or logic instructions on RAM locations. AVR is a register based architecture, so you first need to load the RAM location to a register to do something with that and store it afterwards, Secondy which is even more strange in AVR is that you cannot use all available registers for all instructions, for bit manipulations for example you need to load the RAM location and even certain register location into a specific register region to do that. As a results AVR sometimes even slower than PIC (LDS takes 2 cycles, SBR is 1 only, SBS 2 cycles again, which is 5 cycles -- for PIC the same you need only 1 instruction that takes 1 cycle which is 4 OSC). This is an extreme example I know, but the typical speed ration is around 2:1 so the AVR could be still faster by consuming 4 times more current. There are many nice thing in AVR though ,but GCC and WinAVR is not really one of them. The compiled code is just acceptable, if you want to achieve better performance you need to use weird attributes and even then it makes weird stuff like you want to put a variable on a specific register (to avoid this LDS-STS issue), and for example if you load it's value from PORTB then it first loads into another register and then moves that register into yours. Honestly I think that for prices $2-$5 / unit you can get the 16bit PIC (PIC24 or dsPIC) which are 32MHz/16MIPS or even 80MHz/40MIPS but with PIC architecture so overall it is faster than 8 bit AVR for sure. Also you can get one with USB module, 32bit timer, 16bit PWM etc... BTW for AVR there is a debugger/programmer similar to PICkit2 which is called AVR Dragon. It is around $50: http://www.atmel.com/dyn/products/view_detail.asp?ref=&FileName=AVRDragon_9_18.html&Family_id=607 Tamas -- /* www.mcuhobby.com */ int main() { char *a,*s,*q; printf(s="/* www.mcuhobby.com */ int main() { char *a,*s,*q; printf(s=%s%s%s, q=%s%s%s%s,s,q,q,a=%s%s%s%s,q,q,q,a,a,q); }", q="\"",s,q,q,a="\\",q,q,q,a,a,q); } -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist