Whats the cheapest off brand of MCUs i can get? - Page 1
Forum section: electronics / general

author: BiOzZ
author_rank: Regular Contributor
timestamp: April 15, 2013, 01:24:41 am
content: i want 100 count of some REALLY cheap yet somewhat reliable micro controllers to stick on some PCB business cardsmy only needs are it needs to be a microprocessor with on board memory and all of that, it needs to be an architecture that exists more than in the one product, and a decent english or russian datasheet, dip/SOIC package ... maybe SSOP or TQFP ... OH and can be programmed in something other than an $10,000 dev platform ...i searched digikey and mouser and newarc but im sure there is something out there they can not be bothered to stock!

author: c4757p
author_rank: Super Contributor
timestamp: April 15, 2013, 01:27:09 am
content: Depends highly on what you need! Considering "microcontroller" can be anything from 8 bytes (yes,bytes) of RAM to many kB, with anything from just GPIO to a massive collection of peripherals, that's a hard question to answer.

author: mariush
author_rank: Super Contributor
timestamp: April 15, 2013, 01:33:17 am
content: Yes, you'll have to be more explicit with your needs.Seehttp://www.digikey.com/product-search/en/integrated-circuits-ics/embedded-microcontrollers/2556109?quantity=100&ColumnSort=1000011&fid=0, loads of choicesYou'll also have to think about the microcontroller having built in oscillator or not (so you won't have to use RC or external oscillator), how many io pins you need etcPIC and Atmel's attiny whatever you can buy anywhere and programmers are cheap. 8051 based chips may also be a good option, since the architecture is old and known...

author: BiOzZ
author_rank: Regular Contributor
timestamp: April 15, 2013, 01:35:41 am
content: Thats whats making this search so hard ... i will work my needs around the MCU ... im just looking for bottom dollar

author: c4757p
author_rank: Super Contributor
timestamp: April 15, 2013, 01:39:49 am
content: Quote from: BiOzZ on April 15, 2013, 01:35:41 amI don't think you understand. Can you work your needs aroundthis? Because you can get 100 of them for $34. But I suspect it's not quite sufficient.You really need to come up with at least a bare minimum of features, RAM, whatever.(No, Mouser data entry oompa-loompas, that doesnothave a USB interface. It's barely capable of printing the word "USB" on a serial LCD, if you're good at writing small code.)

author: BiOzZ
author_rank: Regular Contributor
timestamp: April 15, 2013, 01:45:32 am
content: Ah yes perfect thank you! just 2 of these will do me fine per card!

author: BiOzZ
author_rank: Regular Contributor
timestamp: April 15, 2013, 01:46:17 am
content: and yes i have become quite good at writing small ASM code ... tho i need to brush up

author: c4757p
author_rank: Super Contributor
timestamp: April 15, 2013, 01:48:15 am
content: Wait, really? What are you doing with them?Be careful with that one. You need to figure out how you're going to program it - it's only got 6 pins, you know (even the DIP-8 version leaves two unconnected).

author: mariush
author_rank: Super Contributor
timestamp: April 15, 2013, 01:49:05 am
content: BiOzZ, you can get microcontrollers that have only 6 pins and 2 i/o ports, just enough to light a few leds or do some bitbanging, or you can spend 10-15 cents more and get a good all around chip.For example here something that looks ok :http://www.digikey.com/product-detail/en/PIC16F1503-I%2FSL/PIC16F1503-I%2FSL-ND/27720410.62$ a piece... 72 bytes of ram, 3.5 kb of flash memory, about 10 i/o pins, i2c, spi so you can interact with other ICs, it's flexible, versatile etcif you think your code will be smaller and can fit in 1.5k , then by all means, you could go for a pic16f505 but this one's only 1.5 KB of flash, no i2c, no spi ... but at 0.54$http://www.digikey.com/product-detail/en/PIC16F505-I%2FSL/PIC16F505-I%2FSL-ND/613196or go even lower at 0.46$ and get a pic16f54 :http://www.digikey.com/product-detail/en/PIC16F54-I%2FSS/PIC16F54-I%2FSS-ND/613200but what's the point of having 12 io pins when you only have 678 bytes of flash and 25 bytes of ram? you'd really have to work really hard at writing assembler to squeeze stuff in. Probably not worth the savings.Instead of using two of those pic10 chips, you might as well get one of those pic16 that's a bit more expensive but not quite as expensive as 2 pic10 and you're done.

author: BiOzZ
author_rank: Regular Contributor
timestamp: April 15, 2013, 02:01:17 am
content: Quote from: c4757p on April 15, 2013, 01:48:15 amill just make a dropper programming rig, program them than solder it onand im not 100% sure what there fictions will be but now i have the MCU i can build out from thereQuote from: mariush on April 15, 2013, 01:49:05 ami have been programming for years and i cant even begin to think of how good of a programmer you will have to be to utilize 12 i/os with 25 bytes of ram to do anything more than flash some LEDsbut c4757p's suggestion has the pins, ram and power consumption i can work withnot to mention a funny small foot printthis will be a fun exercise!tho i am now tempted to also get a few of the PIC16F1503's just to see what i can make one do!

author: c4757p
author_rank: Super Contributor
timestamp: April 15, 2013, 02:03:57 am
content: Quote from: BiOzZ on April 15, 2013, 02:01:17 amSmall is for damn sure! They are literally the same size as a small surface mount transistor, with three more pins squeezed on. The fact that they can fit a CPU, flash ROM and RAM in there absolutely boggles my mind.

author: BiOzZ
author_rank: Regular Contributor
timestamp: April 15, 2013, 02:12:11 am
content: Quote from: c4757p on April 15, 2013, 02:03:57 amTech today is amazing ... i would not even notice it when looking at a PCB!this is going to be fun!

author: MacAttak
author_rank: Unknown
timestamp: April 15, 2013, 03:54:09 am
content: Should be a fun project. I've tinkered with the really tiny Atmel microcontrollers and it was an interesting process. I had a hell of a time getting something worthwhile to fit in under 1K of flash - so you've got your work cut out for you with a mcu that only has 384 B

author: Psi
author_rank: Super Contributor
timestamp: April 15, 2013, 03:58:12 am
content: Cheapest will probably be those 4bit china mcus you sometimes see in throwaway stuff.But i doubt you will find them on digikey.You don't want to go too cheap for business card micros.If they fail to work it doesn't give a good impression of you.

author: westfw
author_rank: Super Contributor
timestamp: April 15, 2013, 08:57:22 am
content: The last time I looked, the Freescale rs08 series looked to be doing especially well in terms of bang per buck. Relatively pleasant architecture, too.These days there's quite a bit under 0.50...No 0.25 chip like the tiny11 was briefly, though...

author: amyk
author_rank: Super Contributor
timestamp: April 15, 2013, 10:40:21 am
content: Take a look at the STC 8051s... current prices are around $0.20USD and the smallest one has more flash than the smallest PIC:http://www.stc-51.com/stc15f100.php(Part number probably not a coincidence...)

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: April 15, 2013, 11:11:58 am
content: PIC10F200 is probably the cheapest generally accessible MCU in that volume

author: nctnico
author_rank: Super Contributor
timestamp: April 15, 2013, 11:53:53 am
content: Quote from: BiOzZ on April 15, 2013, 01:24:41 amLook for TI's MSP430. Very cheap and extremely low power.

author: westfw
author_rank: Super Contributor
timestamp: April 15, 2013, 03:21:23 pm
content: QuoteOK, I'm intrigued. Are there any links to actually buy those that aren't dead or leading to a "no longer available" page?(OMG, the blinking text...)

author: AndreasF
author_rank: Frequent Contributor
timestamp: April 15, 2013, 06:23:50 pm
content: Quote from: nctnico on April 15, 2013, 11:53:53 amThat would have been my suggestion as well, e.g.http://www.digikey.co.uk/product-detail/en/MSP430G2230IDR/296-30235-1-ND/3028952

author: Unknown
author_rank: Unknown
timestamp: April 15, 2013, 07:10:02 pm
content: $0.48/100 is not particularly cheap, in my opinion. Both Microchip and Atmel have devices around the $0.30 mark, for example the ATtiny13 for $0.34/100.

author: nctnico
author_rank: Super Contributor
timestamp: April 15, 2013, 07:34:38 pm
content: Price is not everything. Everybody likes to think the cheapest parts make the cheapest solution. In reality an MSP430 is a real 16 bit architecture and the development tools including a proper C compiler (GCC) are completely free. The PIC C compiler costs $1195. So your 100 PICs will cost ($1195+ $34)/100=$12.29 each. The architecture of 8 bit PICs is so archaic that you need to write C with a twist. Not so for the MSP430 so its easier to port / re-use your code later on.A large portion of the cost of a circuit containing a microcontroller goes into developing the embedded firmware. Keeping your code portable makes the investment in software keep its value.

author: AndyC_772
author_rank: Super Contributor
timestamp: April 15, 2013, 07:49:56 pm
content: The fully optimising compiler might cost that, so use the free one - or write in assembler if need be.

author: nctnico
author_rank: Super Contributor
timestamp: April 15, 2013, 08:08:15 pm
content: In that case writing the software may take 3 times longer or you need a more expensive device with a bigger flash. So instead of spending 20 hours you may end up spending 60 hours. Even at $40 per hour that will cost you $16 per controller extra.

author: AndyC_772
author_rank: Super Contributor
timestamp: April 15, 2013, 08:27:27 pm
content: Or it might just work perfectly well. Every design I've done for the last couple of years has compiled, fitted and worked with no problems at all that were down to using the free compiler. The choice of device has always come down to some factor other than compiled code size or speed.

author: Unknown
author_rank: Unknown
timestamp: April 15, 2013, 08:28:00 pm
content: The ATtiny13 I mentioned works with the same free GCC compiler. Cheap programmers are also available.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: April 15, 2013, 09:17:30 pm
content: Quote from: AndyC_772 on April 15, 2013, 07:49:56 pmOr the trial version of the free one - shouldn't take anywhere near 30 days to fill a device that small!

author: smashedProton
author_rank: Frequent Contributor
timestamp: April 16, 2013, 05:39:14 am
content: Could you please make the design open source? I would send you a postcard! There needs to be more novel oshw projects. Like Dave's power supply.

author: westfw
author_rank: Super Contributor
timestamp: April 16, 2013, 04:07:50 pm
content: One of the things that this conversation highlights is that when you get to the point where a couple of cents per part is a "significant" price, the supplier may make more of a difference than the chip. I can't find $0.34 ATtiny13s, and I can't find those STC-51 chips anywhere.One of the "off" brands that show up occasionally is Holtek, who sells some sort of PIC clones.But I have no idea where you might be able to buy ~100 of them...

author: nctnico
author_rank: Super Contributor
timestamp: April 16, 2013, 06:35:56 pm
content: Quote from: mikeselectricstuff on April 15, 2013, 09:17:30 pmBut what do you do when the client calls after three months asking to make some changes?

author: mrflibble
author_rank: Super Contributor
timestamp: April 16, 2013, 06:42:15 pm
content: Quote from: nctnico on April 16, 2013, 06:35:56 pmUse the free non-optimizing compiler, since the code that one produced fits as well.

author: mariush
author_rank: Super Contributor
timestamp: April 16, 2013, 07:13:24 pm
content: Quote from: nctnico on April 16, 2013, 06:35:56 pmOr trick the evaluation expiration... Install the compiler in a virtual machine (emulated windows), disable updating time and all that so that windows won't update time when rebooting, turn off windows and make a copy of the emulator's hard drive image somewhere. Whenever the compiler expires, replace the active hard drive image with a copy of your original hard drive image from back then.You'll be constantly frozen at that first day of evaluation.But then again, if you go to so much trouble, you might as well crack the compiler, there are keygens and patches available on the internet.

author: AndyC_772
author_rank: Super Contributor
timestamp: April 16, 2013, 07:24:33 pm
content: Quote from: nctnico on April 16, 2013, 06:35:56 pmExactly like I said:Quote from: meSeriously... you're pretending like the free compiler is so useless as to not even be worth considering, and I don't get why. It works, I use it, both for personal stuff and professionally, and there have been no instances where the full version of the compiler would have allowed me to use a cheaper device.If you need the full version then fine, I can see that in some cases it might be beneficial - but don't assume it's always necessary.: another option, of course, is to buy the full compilerifyou then need it to fulfil the client's later request, andifthe value of that work covers its cost.

author: westfw
author_rank: Super Contributor
timestamp: April 16, 2013, 10:59:28 pm
content: I had the distinct impression that the original poster was willing to tightly hand-code in assembler.Or even machine code, if that would save 30% or so in the cost department. It wasn't that long ago where this wouldn't be too odd; I think I have still some programming pads around with 1802 assembler partially hand-translated to hex with the idea that it would be keyed into a computer via the keypad...(Although, I also have (much more recently) a bunch of (OTP) 4-bit CPUs for which there doesn't seem to be a free assembler available. I find that really, really, sad.)Another idea for C on Microchip PIC8: use one of the third-party compilers that generates better code for free, at least for limited program size. Or JAL.

author: ve7xen
author_rank: Super Contributor
timestamp: April 16, 2013, 11:40:34 pm
content: Not much more than the PIC10 but a hell of a lot more useful, STM8. STM8S003F3P6 is readily available for $0.35/pc @ 100pcs (from AvNet) or cheaper if you can handle QFN. It's an 8KB flash, 1KB RAM 20 pin device with ADC and some peripherals (serial, timers etc.). If you're okay with not using GCC there is a free 8k limited compiler available from Cosmic Software. You should be able to use the cheap STM8SDISCOVERY board to program/debug it.

author: amyk
author_rank: Super Contributor
timestamp: April 18, 2013, 03:21:15 pm
content: Quote from: westfw on April 15, 2013, 03:21:23 pmhttp://s.taobao.com/search?q=stc+15f100And probably some other Chinese sites I didn't bother to check... they clearly do not expend much effort to market their chips to the West.

author: metalphreak
author_rank: Frequent Contributor
timestamp: April 24, 2013, 11:27:25 am
content: PIC10F320 vs a regular DIP8 package. They are tiny!

author: lewis
author_rank: Frequent Contributor
timestamp: April 24, 2013, 07:43:47 pm
content: Quote from: nctnico on April 16, 2013, 06:35:56 pmMikroelektronika's compiler/IDE is completely free, and still fully optimised, for anything under 8K code size, but it doesn't support PIC10. It'll do the smaller PIC12's though and there isn't much difference in MCU cost.Programming in C on a PIC10 is almost completely pointless anyway, you might as well do it in assembly using MPLAB, which is of course free. Due to hardware limitations you couldn't possibly write PIC10 code complex enough that the time savings become worthwhile in C, unless you're in a REAL hurry.As for programming, include some bare SMD pads which correspond to the ICSP pins on the Pickit2. Then, make a little bit of veroboard with a 0.1" header on one end and five of thesehttp://uk.farnell.com/multicomp/p100-h-250-g/plunger-serrated/dp/1568268?Ntt=156-8268on the other. You stick the header in in the pickit and press the spring plungers (pogo pins) onto the corresponding pads on your PCB, and program. No need to waste time inserting the tiny bastard SOT23 packages in a programming socket, and no need to pay Microchip to program the PICs for you prior to SMD placement.Complete development cost? About $40 (or $4 for the pogo pins if you already have a pickit).

author: amyk
author_rank: Super Contributor
timestamp: April 25, 2013, 10:54:16 am
content: Quote from: metalphreak on April 24, 2013, 11:27:25 amI'm guessing you haven't seen the bare die yet... because you'll say that again if you do.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: April 25, 2013, 12:00:44 pm
content: Quote from: lewis on April 24, 2013, 07:43:47 pmIt depends entirely on the functionality. The code size penalty of small C programs when carefully written often isn't much (well under 2x) although the compiler cost vs. time saved tradeoff becomes smaller, but can still be worthwhile.Unless you're doing high volumes, it's often cheaper overall to just spend a little more on silicon with more memory to save coding time squeezing stuff in.

author: metalphreak
author_rank: Frequent Contributor
timestamp: April 25, 2013, 12:56:22 pm
content: Quote from: amyk on April 25, 2013, 10:54:16 amAt this end of the price range, the packaging actually makes a big difference in cost price tooDIP8 is 20% more expensive than SOT-23.

author: Stonent
author_rank: Super Contributor
timestamp: May 16, 2013, 03:46:12 pm
content: On the subject of Microcontroller business cards....http://hackaday.com/2013/03/27/business-card-draws-ch00fs-logo/

author: Rasz
author_rank: Super Contributor
timestamp: May 16, 2013, 04:22:46 pm
content: There is whole Chinese market of wonderful ICs not available to usSmart card readers/usb flash controllers/SD card controllers for example - Somehow small chinese shops can get their hands on bare dies and full datasheet for those devices. Getting something like this outside Asia will cost thousands of dollars for joining licensing cartels/standard consortiums, not to mention proving you already have a company making hundreds of thousands of similar devices and signing NDAs.

author: amyk
author_rank: Super Contributor
timestamp: May 17, 2013, 07:20:04 am
content: Quote from: Rasz on May 16, 2013, 04:22:46 pmIt's all about knowing the right people