Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Which microcontroller is better PIC or AVR?

Status
Not open for further replies.
PIC or AVR

I contacted the registered owner of the h**p://www.microschematic.com domain name. He said the interactive flash representaion of the Atmel AVR microcontroller will be posted online within a week.
Today is 1-17-2007.
 

Re: PIC or AVR

Again PIC or AVR...

I (maybe We) already tired that nonsense question.. I expressly beg to the moderator to open another forum as "Which is better PIC or AVR?"

Maybe after that we can read and discuss more useful topics in that Microcontrollers Forum instead of "Which FRUIT is better?"...

Regards.
 

Re: PIC or AVR

i think AVR more simple and powerpull
 

Re: PIC or AVR

I've studied the 8051 and now I'm studing AVRs.
I don't know programming PICs but AVRs are very powerful.
 

Re: PIC or AVR

mohamed saleh said:
hi all
how r u
i have finished an 8051 cource
but as you know it is a dummy microcontroller
i want to learn a powerfull microcontroller
should i learn pic or avr
and where can i get the tutorials
thanks

go ahead for PIC man right now
 

Re: PIC or AVR

I have a similar question.

I'm designing a project and I really need a fast microcontroller (something like 40mips). At first I considered dsPIC, but now I'm no very sure about that.

Does somebody can recommend me a FAST microcontroller? (I know how to program motorola and Pic, but I don't mind learning something new).

Thanks
 

PIC or AVR

i think AVR still the best.. coz my background is 8051 too
 

PIC or AVR

both of them have its own advantage,

I find this article in the web

Ways 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 consumption
PICs have much lower power consumption at 5V

Interrupts

Interrupt 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.

ADC
Much 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.

Availability
Microchip 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 (90S8515, now ATMega8515).

Devtools, programming, production etc.
PIC good :
One full-ICE platform (ICE2000) for all parts - Several variants of AVR ICEs for different parts, despite much fewer parts..!
All device configuration including internal eeprom initialisation is contained in one hex file.

AVR bad :
Device configuration etc. is a complete mess - there is no standard file formet to contain flash, eeprom and the many device config fuses, which can be a nightmare when transferring designs to production. There are 3rd party programmers that do this but this is something that should be defined by the manufacturer.
Calibration of internal RC osc on many parts (e.g. tiny26, mega16) is unnecessarily complex - for other than the default 1MHz rate, cal data has to be read from a special area by the programmer, then programmed into flash or eeprom so the application code can get at it to write to the osc cal register. This means that the application code and programming process need to have knowledge of each other, which can be a problem when a design goes to production.


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 consumption
Brownout detector on recent parts has much lower consumption than the PIC one, which is often useless for battery-powered apps.

UART
TX 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,

ADC
Some 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/O
Seperate 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).
 

PIC or AVR

i worked with 8051 for 3 years BUT i prefer avr!!(RECOMMANDED)
 

PIC or AVR

They are all great chips. The 8051, AVR and hc's and the pic18's have index registers and are more amenable to programming in C than the pic16 is. That being said, the pic16's come in an awesome range of chips. The latest generation with the enhanced timers, PWM and Serial port come in at an unbeleivable price. Look at the 20 pin PIC16f690 with 4 channels PWM. A sync/async serial port and an SPI/I2C MSSP and ten or 12 channels of ADC. And an internal 8 MHZ oscillator accurate to 1%. Up to 18 IO pipns in a 20 pin package. And 256 bytes EEPROM and 4K flash program memory that you can bootload or rewrite. And it costs a few dollars. No other chip is going to touch that. That being said, if you go with an 805X core based chip or an ATMega or an HC08, I'm not going to bitch. They are all great chips.
 

PIC or AVR

I Think PIC or AVR easy to learn and you think you
like to learn microcontroller and verry example
 

Re: PIC or AVR

jhbbunch said:
They are all great chips. The 8051, AVR and hc's and the pic18's have index registers and are more amenable to programming in C than the pic16 is. That being said, the pic16's come in an awesome range of chips. The latest generation with the enhanced timers, PWM and Serial port come in at an unbeleivable price. Look at the 20 pin PIC16f690 with 4 channels PWM. A sync/async serial port and an SPI/I2C MSSP and ten or 12 channels of ADC. And an internal 8 MHZ oscillator accurate to 1%. Up to 18 IO pipns in a 20 pin package. And 256 bytes EEPROM and 4K flash program memory that you can bootload or rewrite. And it costs a few dollars. No other chip is going to touch that. That being said, if you go with an 805X core based chip or an ATMega or an HC08, I'm not going to bitch. They are all great chips.

Actually the 16F690 has a single PWM channel, the 4 outputs are for H-Bridge support, (look for the number of CCP modules to see how many channels)
Also the 16F690 does not have enhanced flash so it does not support a bootloader (usually the 16F8xxx have enhanced flash so can be used with a bootloader)
Lastly it's a SSP not a MSSP (so I2C master mode in hardware isn't there, can be done with firmware though)
On the plus side it does support ICD debugging, eight speed oscillator and an advanced ESUART. Still it's a popular and and good PIC.

Most folks compare the 30yr old 16F design with ATMEL and it can hold its own. They should be comparing the 18F design which is a more modern but and more sophisticated PIC than the 16F series. In many ways they are actually easier to program than the 16F and are C friendly and a free C18 compiler (student edition don't worry it's only limited to not using the full optimizations when compiling)
 

Re: PIC or AVR

i think you should go for FREESCALE HC(S)08
TOOL FOR THAT IS CODEWARRIOR
YOUR DEVELOPMENT CAN BE VERY FAST AND RELIABLE.

AND THE SAME COMPILER IS AVAILABLE FOR FREESCALES DSP,COLDFIRE
POWERPC ETC SO LEARNING ONE CAN GET YOU TO MAKE COMFORTABLE YOU
TO LEARN OTHERS

YOU CAN USE THE ATTACHED SCHEMATICS FOR MAKING DEVELOPMENT TOOL
 

PIC or AVR

Freescale, naa.

Lets see vikramprataapsingh your past posts said
for start u should go for microchip 16f76 that is cheep and having good current capabilities and good speed

Do you have any experience with Freescale or just a notion?

Good news you'll never have to worry about case sensitive compilers!

The demo board schematic does not appear to be a programmer or debugger, just another demo board.
**broken link removed**
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top