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.

Suggest the best microcontroller

Status
Not open for further replies.

akikito

Newbie level 4
Joined
Oct 17, 2010
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,338
please suggest me the best microcontroller which meets these required spec?
- low cost
-min instruction code
-the test machine required 10 inputs and 9 outputs
 

Hi,
There is no best microcontroller but it depends on your choice.
You could check the AVR and PIC series of microcontrollers as these are very popular 8-bit microcontrollers and are quite cheap.
Atmel Corporation - Industry Leader in the Design and Manufacture of Advanced Semiconductors -> Website of ATMEL, manufacturer of AVR microcontroller
Microchip Technology Inc. is a Leading Provider of Microcontroller and Analog Semiconductors, providing low-risk product development, lower total system cost and faster time to market for thousands of diverse customer applications worldwide. -> Website of Microchip, manufacturer of PIC microcontroller

Hope this helps.
Tahmid.
 
i would like to say AT89S52 cheap and best, easy to program,, part of college curiculum almost every one knows about it..
AT89S52 its 8 bit controller with 8K program memory 256 byte ram 32 io pins, UART, interrupts, timers
In system programble
 

If you are looking for less no: of instructions while programming & programming speed,go for AVR or PIC. In case of 8051 series there are almost 256 instructions but in the case of PIC & AVR there are only 35 instructions. Also compared to 8051,PIC & AVR are more faster in execution of the code.
Regards,
Jerin.
 

Its always a funny question 'Best"
best is a relative term and depends on dozens of question. In your case
1) cost
Cost depends on quantity required, availability.
2) Instructions
PIC and AVR both could fit.
3) 19 I/O
Any 28 pin or above, PIC or AVR could meet that.
 

Cost effective would be AVR rather than PIC...... In INDIA,we would get the basic AVR(40 pin) to about 60Rs while PIC of 40 pin cost 160Rs...... Compared to PIC ,AVR has an additional advantage of lower cost cost & more speed of execution.
Regards,
Jerin. ;-)
 
You just find out the requirement what you need from microcontroller. Ex.:- Internal Flash Memory, ADC channnel with 10/12 bit resolution, Timer, etc .
Then go through low cost,min instruction code.

Regards
Chanchal Chauhan
 

Cost effective would be AVR rather than PIC...... In INDIA,we would get the basic AVR(40 pin) to about 60Rs while PIC of 40 pin cost 160Rs...... Compared to PIC ,AVR has an additional advantage of lower cost cost & more speed of execution.
Regards,
Jerin. ;-)


Interesting.

I dont know anything about AVR's
Could you show a comparison between a similar PIC and AVR and the price you'd pay for each?

I have always assumed that similar specs were at similar prices (market forces)
Maybe I need to look again.

jack
 

Hi 123jack,
It all depends I guess on the usage. Over here the entire market belongs to AVR with very few PIC users, so that's why AVRs are MUCH cheaper than PICs. However that may not be a situation somewhere where PIC is used more.
A comparison:
ATMEGA48 here costs $0.7 whereas the closest PICs are 12F675 $0.75 and 16F676 $1.5 - ATMEGA48 is much much superior
ATMEGA16 costs around $2, ATMEGA32 $3 whereas the equivalent PIC16F877A costs $3 and PIC16F887 costs $5 - ATMEGA16/32 are very good at those prices

Hope this helps.
Tahmid.
 
Hi 123jack,
It all depends I guess on the usage. Over here the entire market belongs to AVR with very few PIC users, so that's why AVRs are MUCH cheaper than PICs. However that may not be a situation somewhere where PIC is used more.
A comparison:
ATMEGA48 here costs $0.7 whereas the closest PICs are 12F675 $0.75 and 16F676 $1.5 - ATMEGA48 is much much superior
ATMEGA16 costs around $2, ATMEGA32 $3 whereas the equivalent PIC16F877A costs $3 and PIC16F887 costs $5 - ATMEGA16/32 are very good at those prices

Hope this helps.
Tahmid.


Cost depends its peripheral features, memory etc.
PIC18F24J50 costs 1.90USD. Can you suggest me a AVR controller with FullSpeed USB 2.0 ???
 

But what about its cost,memory etc.

AT90USBxx is not available in DIP (Correct me if wrong) and AT90USB8 costs 3.7USD
PIC18F24J50 is also available in DIP and it costs 3.3USD and PIC18F13K50 costs just 2.42USD. and also PIC18F24J50 is more peripheral RICH than AT90USB8.
(price: From DIGIKEY)

What is your opinion. Don't compare OLD PIC16 and 12 series with AVR.
 

Hi,
AT90USB is specialized for USB, just like AT90CAN and AT90PWM are for CAN and PWM. I was just comparing general purpose microcontrollers. Like the 18F4550 and 18F458 here cost $5, 18F1320 cost $4. I was just trying to say that it also depends on usage. Why PICs are so expensive here maybe due to the lack of use here. But for comparison's sake check out ATMEGA16U4 - $3.4 at mouser or ATMEGA32U4. These are ones with very good peripherals. (not DIP)
I think that should compare well with the 18F24J50, it has max 16MIPS operation, 16k flash, 1.25k sram, 512bytes eeprom, 5 timers - 2 8-bit, 2 16-bit, 1 10-bit high speed operating upto 96MHz, 14 PWM channels - 4 8-bit and 10 upto 16-bit, 12 channel 10-bit ADC, SPI, USART, TWI(I2C), interrupt and wake up on pin change (every single IO line), pull-ups on every IO line, onchip temperature sensor, full speed USB 2.0 etc -- all that at $3.4 (mouser)

I don't want to get in an argument. I just wanted to say that price varied with usage, that's all.

Hope this helps.
Tahmid.

---------- Post added at 03:19 ---------- Previous post was at 03:18 ----------

and AT90USB8 costs 3.7USD
is more peripheral RICH than AT90USB8.

It's AT90USB82, there's no AT90USB8.
 
Last edited:

Could you show a comparison between a similar PIC and AVR and the price you'd pay for each?

Briefly we can distinguish between the 3(8051,PIC & AVR) as:

8051 - 8 bit micro based on CISC architecture ( Complex Instruction Set Computer)

PIC - 8 bit micro based on RISC architecture ( Reduced Instruction Set Computer)

AVR - 8 bit micro based on RISC architecture ( Reduced Instruction Set Computer)


there are also 16bit and 32 bit micros from the same family

invention wise, 8051 is the forefather ( date of birth = 1985), next cam PIC s and then came the AVRs.


its essential to learn 8051 to be able to learn other micros. if we come to instruction set of these micros :

8051 has 250 instructions which take 1 to 4 machine cycles to executive
PIC has nearly 40 instructions which are mostly 4 cycles instructions
AVRs have 140 instructions whcih are mostly 1 cycle based

if we come to speed factor:

1 machine cycle in 8051 (normal) divides the clock freq. by 12 ( some derivatives divide by 6 and by 1 also)

1 machine cycle in PIC divides the clock freq by 4

1 M.C in AVRs divides the clock freq by 1

for eg: if we use 12 Mhz Xtal in all the 3 micros then the speed of execution will be as follows:

8051 = 12Mhz /12 = 1 Mhz i,e = 1 million instructions per second
PIC = 12Mhz/4 = 3 Mhz i,e = 3 million instructions per second
AVR = 12Mhz/1 = 12 MHz i,e = 12 Million instructions per second

so you can clearly see the that AVR executes more no:eek:f instructions per given time and can be considered as the fastest among the 3.

also 8051 consumes more power than the other two and PIC consumes the least power.

Both PIC and AVR are RISC based but their instruction Sets are entirely different.

from Programming ( i,e writing code ) point of view : 8051s are easy to code , next come PIcs and last comes AVRs.

8051 has very powerful instruction set, it has commands which do more complex calculations, it also has got strong arithmetic logic unit which makes computation simple.

whereas PICs and AVRs have simple single instrcutions and the programmer has to tell (dictate) each and every step to achieve the final outcome.

for eg:

you would be surprised to know that normal AVRs do not have Multiplication instruction.

in 8051 Assembly we can simple use the instruction : MUL A,B

but in AVR you have to write some 20 lines of code to multiply two resgisters or values.

similiarly division also : in 8051 we have DIV A,B but in AVR again you have to write some 20 lines of code.

There is no ADD instruction in AVRs, in 8051 we can Compliment a port bit or a bit variable by using CPL instruction but in AVR we don't have this instruction.

in 8051 we can easily access the individual port bits but in AVRs we don't have this freedom.

8051 is still in use bcoz of its simplicity and popularity and lowest cost.

AVRs and PICS are costly and come with many on chip peripherals like : hardware SPI, ADC, I2C, USART , Analog comparator, internal RC oscillator, in-system programmablity etc.

also if see vendor support: 8051 are manufactured by over 50 companies whereas PIC & AVRs are manufactured only by their parent companies i,e microchip and Atmel.

for eg: if you are using a particular variant of AVR and Atmel discontinues it then you'll have no other choice than to shift to another variant offered by Atmel which may be costly and need program changes.

but with 8051 you can run the code in any 8051s manufactured by so many companies.
(Refer the link:- what's diff' between 8051,PIc and AVR ? : 8051 Microcontroller Projects AVR PIC Projects Tutorials Ebooks Libraries codes).
Regards,
Jerin. ;-)
 

you would be surprised to know that normal AVRs do not have Multiplication instruction.

in 8051 Assembly we can simple use the instruction : MUL A,B
As far as I know any normal ATMEGA has a 2-cycle hardware multiplier. There's MUL, MULS, MULSU, FMULS, FMULSU (fraction multiplication as well). Only the ATTiny series doesn't have multiplier, I don't know about the classic AVR, they are very old.

There is no ADD instruction in AVRs, in 8051 we can Compliment a port bit or a bit variable by using CPL instruction but in AVR we don't have this instruction.
Yes there is ADD instruction in AVR.

in 8051 we can easily access the individual port bits but in AVRs we don't have this freedom
Can you elaborate on this, as the AVR has SBI and CBI, IN and OUT, (set bit) and (clear bit) instructions.

Hope this helps.
Tahmid.
 

Hi,
------
I think that should compare well with the 18F24J50, it has max 16MIPS operation, 16k flash, 1.25k sram, 512bytes eeprom, 5 timers - 2 8-bit, 2 16-bit, 1 10-bit high speed operating upto 96MHz, 14 PWM channels - 4 8-bit and 10 upto 16-bit, 12 channel 10-bit ADC, SPI, USART, TWI(I2C), interrupt and wake up on pin change (every single IO line), pull-ups on every IO line, onchip temperature sensor, full speed USB 2.0 etc -- all that at $3.4 (mouser)

I don't want to get in an argument. I just wanted to say that price varied with usage, that's all.


There is no 8bit PIC controllers with 96Mhz of CPU speed (24MIPS) and 18F24J50 doesn't have 16MIPS (12MIPS only) and many mistakes in your statement.


Thanks.

---------- Post added at 06:56 ---------- Previous post was at 06:43 ----------

PIC has nearly 40 instructions which are mostly 4 cycles instructions

Why r u not considering PIC18 as 8bit controller ??????
PIC18 core has 75 standard instructions. I know many of us studied PIC16 controllers in engineering. But don't think PIC16 is the only 8bit PIC controller.

[/COLOR]
for eg: if we use 12 Mhz Xtal in all the 3 micros then the speed of execution will be as follows:

8051 = 12Mhz /12 = 1 Mhz i,e = 1 million instructions per second
PIC = 12Mhz/4 = 3 Mhz i,e = 3 million instructions per second
AVR = 12Mhz/1 = 12 MHz i,e = 12 Million instructions per second

Its not true we can use internal PLL in PIC controllers to get Upto 16MIPS throughput (not available in all MCs) this feature is available with all PIC18F controllers and some PIC16 controllers. You can also change MIPS without changing the crystal but by changing PLL config.

Thanks.
 
Last edited:

Hi,
What I said was for the ATMEGA16U4, not the 18F. "it has max 16MIPS operation, 16k flash, 1.25k sram, 512bytes eeprom, 5 timers - 2 8-bit, 2 16-bit, 1 10-bit high speed operating upto 96MHz, 14 PWM channels - 4 8-bit and 10 upto 16-bit, 12 channel 10-bit ADC, SPI, USART, TWI(I2C), interrupt and wake up on pin change (every single IO line), pull-ups on every IO line, onchip temperature sensor, full speed USB 2.0 etc -- all that at $3.4 (mouser)" this goes for ATMEGA16U4.
 

Hi,
What I said was for the ATMEGA16U4, not the 18F. "it has max 16MIPS operation, 16k flash, 1.25k sram, 512bytes eeprom, 5 timers - 2 8-bit, 2 16-bit, 1 10-bit high speed operating upto 96MHz, 14 PWM channels - 4 8-bit and 10 upto 16-bit, 12 channel 10-bit ADC, SPI, USART, TWI(I2C), interrupt and wake up on pin change (every single IO line), pull-ups on every IO line, onchip temperature sensor, full speed USB 2.0 etc -- all that at $3.4 (mouser)" this goes for ATMEGA16U4.

3.4USD is k and of course its a good controller but please note the min. quantity(mouser) and it is not hobbyist friendly (its package).
 

Hi,
I just wanted to say that price varied with usage, that's all.
And there's no point going into which is better, both AVR and PIC are very good and that's why they are in the market. I just brought out a comparison for 123jack. Each has its own advantages and disadvantages. We live with that and choose whichever we feel is best suitable for us in our application.

Hope this helps.
Tahmid.
 

Hi,
I just wanted to say that price varied with usage, that's all.
And there's no point going into which is better, both AVR and PIC are very good and that's why they are in the market. I just brought out a comparison for 123jack. Each has its own advantages and disadvantages. We live with that and choose whichever we feel is best suitable for us in our application.

Hope this helps.
Tahmid.

Yes, thats the point.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top