Ways in which AVRs are better than PICs.
Instruction set/architecture
AVR good : Add with carry, and compare with carry simplify multiple precision arithmetic. Good range of conditional branches.
PIC bad : Unconventional mnemonic names.. Only one pointer for indirection. Inefficient lookup tables. No add/subtract with carry, small stack. Paged architecture becomes a real pain on larger projetcs, although the PIC18 architecture addresses (pun intended!) many of the issues.
Clocks etc. Wider range of RC oscillator speeds. PLL high-frequency IO clock on some parts for high-speed captre etc.
More instructions per oscillator clock, but as most instructions take 2 cycles, and more instructions are often necessary for IO intensive tasks, this advantage is 2:1 at best. Most embedded apps are not especially throughput-dependent. Also, crystals and resonators get bigger and harder to get much below about 3MHz, so the speed advantage over a 4MHz PIC can often not be a major issue.
Watchdog can be turned off by software.
Power consumptionBrownout detector on recent parts has much lower consumption than the PIC one, which is often useless for battery-powered apps.
UARTTX and RX can be enabled seperately - useful for multi-processor comms on a common bus. High baudrates are possible from low clock frequencies.
Interrupts Vectored interrupts are more efficient where there are multiple interrupt sources, and registers can be reserved for interrupt-only use to speed up context save for low latency,
ADCSome parts have differential inputs and a x20 gain amp, although the latter is so noisy (on the tiny26 at least) it reduces effective number of bits to 8.Internal voltage reference - accuracy not great but often useful, even if only for measuring battery voltage.
I/OSeperate PORT and PIN registers avoid read-modify-write issues with capacitively loaded pins. (Although has any AVR user never spent time wondering why their input port isn't working because they used PORTx instead of PINx...? ).
Devtools, programming, production etc.JTAG-ICE Mk.II is really fast and very like a real ICE! Debugwire looks very interesting, using the reset pin only. PIC in-circuit debugger uses 2 pins, (however the large variety of PICs available means there is usually another part you can use for debugging).
Crack AVR Crack PIC Crack MCU Fast PCB
Instruction set/architecture
AVR good : Add with carry, and compare with carry simplify multiple precision arithmetic. Good range of conditional branches.
PIC bad : Unconventional mnemonic names.. Only one pointer for indirection. Inefficient lookup tables. No add/subtract with carry, small stack. Paged architecture becomes a real pain on larger projetcs, although the PIC18 architecture addresses (pun intended!) many of the issues.
Clocks etc. Wider range of RC oscillator speeds. PLL high-frequency IO clock on some parts for high-speed captre etc.
More instructions per oscillator clock, but as most instructions take 2 cycles, and more instructions are often necessary for IO intensive tasks, this advantage is 2:1 at best. Most embedded apps are not especially throughput-dependent. Also, crystals and resonators get bigger and harder to get much below about 3MHz, so the speed advantage over a 4MHz PIC can often not be a major issue.
Watchdog can be turned off by software.
Power consumptionBrownout detector on recent parts has much lower consumption than the PIC one, which is often useless for battery-powered apps.
UARTTX and RX can be enabled seperately - useful for multi-processor comms on a common bus. High baudrates are possible from low clock frequencies.
Interrupts Vectored interrupts are more efficient where there are multiple interrupt sources, and registers can be reserved for interrupt-only use to speed up context save for low latency,
ADCSome parts have differential inputs and a x20 gain amp, although the latter is so noisy (on the tiny26 at least) it reduces effective number of bits to 8.Internal voltage reference - accuracy not great but often useful, even if only for measuring battery voltage.
I/OSeperate PORT and PIN registers avoid read-modify-write issues with capacitively loaded pins. (Although has any AVR user never spent time wondering why their input port isn't working because they used PORTx instead of PINx...? ).
Devtools, programming, production etc.JTAG-ICE Mk.II is really fast and very like a real ICE! Debugwire looks very interesting, using the reset pin only. PIC in-circuit debugger uses 2 pins, (however the large variety of PICs available means there is usually another part you can use for debugging).
Crack AVR Crack PIC Crack MCU Fast PCB



