> -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf > Of solarwind > Sent: 20 March 2009 17:20 > To: Microcontroller discussion list - Public. > Subject: Re: [PIC] Why let the atmel guys have all the fun? - PICduino - > > On Fri, Mar 20, 2009 at 5:21 AM, Michael Rigby-Jones > wrote: > > cheap, and the AVR is an extremely capable device (more so than the 18F > > in many respects) and b) The 18F does not have the free compiler support > > of the AVR. > > I'd love to hear how the AVR is more capable than an 18F. Please explain. I do hope you aren't trying to start a religious war, all micros have their strong and weak points including the PIC and the AVR. However, I'll take the request at face value. Off the top of my head the AVR offers the following advantages: Not limited to a single 8 bit accumulator (W register). The AVR has 32 registers, most instructions can use any as the destination, some can only use the top 16. Completely non-banked architecture. Not so much of a problem when coding in C, but adds overhead to the code. A proper stack, i.e. you get a proper 16 bit stack pointer, no call depth limitation other than memory size. A 18F PIC has 31 deep hardware stack. You can extend this using software, but with significant overhead compared to the AVR. Faster for a given clock frequency. PIC nominally executes 1 instruction per 4 clock cycles (some instructions take longer), AVR executes one instruction per clock cycle (again, some instructions take longer). Proper vectored interrupts. This is one of the best features IMO, no longer do you have to add a bunch of code to work out why you landed at one of two interrupt vectors, and nested interrupts become much easier, if you require them. The AVR has far superior bootloader support, including the ability to move interrupt vectors into protected bootloader memory and the ability to continue executing code whilst writing to program memory. This single feature has ruled out the PIC on a number of projects I have worked on. Superior debugging support; either a very fast JTAG port or 'Debugwire' which uses only the reset pin. The PIC has it's own strengths however, and I'm certainly not suggesting that the AVR is the best fit for all applications. Regards Mike ======================================================================= This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. ======================================================================= -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist