What is the major difference between PIC and AVR?
A collection of specialists’ answers
Published in
8 min readDec 1, 2019
Hi, this is a compilation of Quora site forum:
By Sarvesh Prajapati, studied GATE Aspirants at Graduate Aptitude Test in Engineering (2018)Answered Jan 11, 2018Here are a few comparisons based on actual issues I’ve dealt with on real projects. These are mostly based on using assembler on the AT90S and current ATTiny and ATMega parts, and PIC12/PIC16 parts. Hopefully this info will help you decide what may be best for you.In which PICs are better than AVRs Instruction set/architecture (for Assembler users)PIC good : Small instruction set means you can literally learn it in a day. Skip instructions can often simplify flow-control.AVR bad : highly nonorthogonal instruction set – many operations can only be done on certain registers. Relative branch range can force code to be arranged in a non-logical order. No immediate XOR instruction. Illogical mixture of skip and branch flow-control instructions (Now if only they’d made STATUS one of the registers you could do skips on….!).Clocks etc.Recent Pics (12Fxxx etc.) have more accurate calibrated RC oscillators.Watchdog wakeup from sleep continues after SLEEP instruction – on AVR it causes a reset, which can complicate things.Power consumptionPICs have much lower power consumption at 5VInterruptsInterrupt latency is constant – if you set up a regular timer interrupt on a PIC, it will occur at exactly the same interval every time. On the AVR you will get at least one cycle jitter.ADCMuch faster conversion speed than AVR I/O and bit-twiddly things I/Os are the same as other file registers, so operations other than bit set/clear operations take less work – bits can be toggled using XORWF, multiple bits can be set or cleared simultaneously using ANDWF or IORWF, and you can do neat tricks like using an output port as a shift-register for really fast pattern generation. The latter is not often useful, but does allow neat stuff like video generation.I/O ports have much better drive capability – the output high level is easily capable of providing a few milliamps without significant voltage drop – useful for directly powering up peripheral devices (e.g. opamps) on demand for power-saving.PIC can wake up from sleep on short pulses and edges. Counters are asynchronous and can count while part is in sleep, and count faster than the CPU clock. AVR cannot wake on edges (Except the few parts that have wake on pin-change), and level-triggered interrupts must be asserted until the chip wakes up and the clock starts otherwise the part will go back to sleep.Configuring AVR reset pin as I/O disables in-circuit programming. On PICs the reset pin can be configured as an input without disabling serial programming, provided whatever is connected to it allows for the 12.5v programming voltage.AvailabilityMicrochip have always had a policy of short leadtimes, and there have never been significant shortages of released parts. Atmel have had some very bad times in the past – their wide product range means that AVRs are a small part of their overall business, so other markets can take priority over AVRs for production capacity. Microchip now has a fast-turnaround test cell to produce devices at short notice (with a price premium).Microchip parts tend to be more easily available, especially in small quantities.Microchip keep old parts available for long after they have been superceded. You can still buy PIC16C54XT’s, despite now being on their fourth revision. Atmel have far fewer parts, yet have obsoleted more of them – e.g. the 90S4414 has been obsoleted twice.----------------------------------------------------------------By Peter Hand
Answered Sep 9, 2014Originally Answered: What are the important differences between PIC and AVR microcontroller platforms?Let's narrow that down to the difference between 8 bit PICs and basic AVRs..PIC needs multiple clock cycles per instruction. AVR executes most instructions in one clock cycle..PIC has a small fixed hardware stack, so subroutines can't be stacked very deep and a C compiler can't create a stack frame. AVR has a stack pointer that can address all available RAM..PIC can only directly address 256 bytes of RAM that have to be bank switched using extra instructions. AVR can directly address 64k..The only free PIC C compiler is crippleware. AVR has a fully functional free GCC compiler supported by a large team..PIC has a 'W' register. AVR has 32 general purpose registers including three pairs that can be used as pointers.----------------------------------------------------------------By Bert Verrycken, Founder, ASIC and FPGA SoC design 4 AI and GPU delisHDL.comAnswered Jan 9, 2018Originally Answered: What is the difference between a PIC and an AVR?Short answer: instruction set.Long answer: PIC is a brand of the company Microchip, AVR is Atmel. Both PIC and AVR are families of microcontrollers. A family meaning, different versions of the controller. There are similarities between PIC versions and AVR versions. Depending on the application, availability and price, designers have a choice between PIC and AVR versions. Microchip acquired Atmel: Microchip Technology, Inc. Acquires Atmel. There might be a merge for PIC and AVR in the long run. It doesn’t make sense (at least for me) to keep two seperate tool chains alive. Within the family of controllers, their will still be specific tools (compilers) needed, but now AVR and PIC do not compete anymore, they are owned by the same company. From an efficiency and cost standpoint, one sub brand makes sense. But I could be wrong.----------------------------------------------------------------By Vinay Chaddha, playing with micro controllers since 1979Answered Jun 19, 2013Originally Answered: What are the important differences between PIC and AVR microcontroller platforms?different suppliers, pin out, instructions, software program (IDE and Compiler) and different tools to burn. However the perform similar functions.
Or let me say same difference as cars from Maruti Suzuki and Hyndai. Both have large variety of cars, have exclusive show rooms and service stations and need different spare parts that may not fit into other models. Heowever you can buy from either of them. They perform same functions.----------------------------------------------------------------By
Wagner Lipnharski, Atmel AVR ConsultantAnswered Jan 10, 2018They are completely different microcontrollers. Compare them is the same as compare apples with carrots. They use different architecture, completely different instruction set, abnormally different way to process instructions - AVR does that in a single clock cycle, PIC needs four, astonishing differences in useful registers - AVR has 32, PIC has one, and so on. I will always choose AVR, due long time ago fine consideration and comparison between both. I like very much to write code in assembly, this single issue was enough to choose AVR, since PIC assembly is confused and not practical by having fewer instructions, not having jump on condition - it becomes long, macaroni style.----------------------------------------------------------------By Tarun Agarwal, Electronics and Electrical Technical HeadAnswered Jun 20, 2016Originally Answered: Embedded Systems: What are the important differences between PIC and AVR microcontroller platforms?AVRs have non-banked access to data memory, whereas PICs seem to require setting bank registers to access beyond 256 bytes of memory. Also, some AVRs support hooking up external SRAM in a way that allows the MCU to use it natively (rather than going through a series of port accesses).AVRs have 32 general purpose registers, the PIC only has one.In AVRs that have SRAM (most of them), the stack is contained within SRAM instead of being limited to a built-in hardware stack. Conversely, with PIC, this is one less thing to worry about.The ATmega and PIC18F have hardware multipliers, ATtiny and PIC16F do not.The AVRs appear to support a more generalized interrupt system (reminds me of the x86 interrupt vector table), as opposed to the PIC high/low priority interrupt vectors.PIC18F appears to be a major improvement over the PIC16F. ATmega has some advantages over ATtiny, but mainly in capacity, not so much in features. Conversely, they're likely much easier to switch between than PIC16F and PIC18FAlthough PIC's clock speeds appear higher, it seems that the clock speed is divided by four to give the actual instruction rate.With PIC16F, the memory size is given in 14-bit words, whereas PIC18F and the AVRs list their program sizes in bytes, so the PIC16F's program size capactity is larger than just the number of K would indicate.AVR appears to be a GCC target.----------------------------------------------------------------By
Originally Answered: What is the difference between a PIC and an AVR?AVRs and PICs are two families of microcontrollers that operate in a similar way. Both have flash memory, EEPROMs, I/O ports, RAM space, timers and counters, USART, CCPs (Capture/Compare/PWM- a special register to do advanced functions), SSP (Synchronous Serial Port), comparators, ADC (Analog-to-Digital Converter), comparators. All can use an ICSP (In-circuit Serial Programmer(ing)). They can both be programmed in assembly language or more commonly in C or C++. Each family requires different IDEs for code development, use different assembly language mnemonics and uses different ICSPs (and ICEs-In-Circuit Emulators). I happened to know both sets of microcontrollers and owning both sets of tools and software. They are fun to use and are very powerful. Both sets of microcontrollers have different pinouts, sometimes different pin names (functions) BUT in essence it is the same as owning a Ford versus a GM car. They work the same but a lot of similarities (and differences) between the two car families.Microchip (which makes the PIC family of microcontrollers) and ATMEL (…AVRs) recently merged.----------------------------------------------------------------By
Rahul Tripathi, Student at Delhi University at University of Delhi (2016-present)Answered Jan 3, 2018PIC has MPLAB X, which is pretty stable (v3.15) and easy to use, with both assembler and C language. Microchip tools, such as PICkit3 debugger and programmer usually run really nicely from MPLAB X. It is much better than the older MPLAB 8.x environment with better debugger integration, a better layout and is much more stable.AVR has AtmelStudio 7, which has comparable features but it is huge (750MB) as it uses Microsoft frameworks, as does MPLAB X but Atmel Studio is large and clunky. It has lots of extra features like solutions and web access that make it more complicated than it needs to be. We have found that lots of people, especially when using laptops, find it difficult to install and that it runs really badly. They are reverting to the old AVR Studio 4.18 (with service pack 3) as it runs much better and has all the features they need. The older JTAGICE emulator is also supported by AVR Studio 4 but not later versions. Debug tools like AVR Dragon work ok in all versions.Click here to know more !! AVR Training ProgramAll the Best !!!----------------------------------------------------------------By
Ari Falkner, works at Software EngineeringAnswered Nov 17, 2013Originally Answered: What are the important differences between PIC and AVR microcontroller platforms?That 8-bit AVRs have 26 working registers, while their PIC equivalents have only 1, the famous "W" register.
Also, AVR XMega's have an attractive interperipheral event system as well as full-on DMA support, steps that attempt to bring ARM functionality down to 8-bit, 32 MHz MCUs.----------------------------------------------------------------By
Chandan Kumar (चन्दन कुमार), 4+ years of experience in embedded systemsAnswered May 31, 2017Thanks for A2A,Their architecture is different and functionality are same like gpio programming, timer, counter, display device interfacing, interrupts and communication protocol.It's just like that both are different companies and manufacture microcontrollers. In avr, we have series like attiny, atmega, atxmega, etc. while in pic we have series like pic 12f,16f,18f,24f etc
Please visit the original site:
https://www.quora.com/What-is-the-major-difference-between-PIC-and-AVR
Thanks!