(Closed) Looking for cheap mcu replacing PIC16F18323 - Page 1
Forum section: electronics / general

author: DavidAlfa
author_rank: Super Contributor
timestamp: May 27, 2021, 10:24:33 pm
content: I a have a custom device that I've been selling at my own for some time, the demand been growing up, so I'm thinking on lowering BOM costs.The board has the size of a euro coin, so everything is very packed together using 0603 passives.I use PWM (Just for fancy led blinking) and external signal capture for reading a 40KHz IR sensor.I've been using the PIC16F18323 for a long time, since it has exactly the pins I need and very small footprint while avoiding the QFN (much easier to solder and more space under it to add vias/traces instead big gnd pad).I can live keeping the pic, but I feel like I'm losing something with these low cost mcus around, since I can get other componentes like drivers and LDOs pretty cheap in aliexpress, and they have never failed.So now I'm thinking on migrating the MCU to a cheaper one! I know there are a lot of chinese mcus that use very similar architectures, but I've never worked with any.The main requirements are:- C toolchain / IDE available would be great- Debugging support- 12 IOs- At least 2 PWM/Capture/compare channels- Some eeprom (<32bytes used)- 76B RAM / 1.6KB flash are being used. So 128 RAM / 2 Flash should be enough- Not OTP! (Always thinking how to improve things, so I often update everything)Looking for recommendations / experiences / advices!

author: DavidAlfa
author_rank: Super Contributor
timestamp: May 28, 2021, 08:06:59 am
content: This thread can be closed and deleted.After a day seeking for options, I've decided it's not worth the effort.The savings were small as new debug tools are needed (not cheap), add poor company support, no forums...Nightmares coming. Staying with microchip!

author: PCB.Wiz
author_rank: Super Contributor
timestamp: May 29, 2021, 03:14:38 am
content: Quote from: DavidAlfa on May 28, 2021, 08:06:59 amThat part looks to be about 65c/1k, with summary as this : 8-bit PIC MCU, 3.5 KB, 256 Bytes, 32 MHz, 1.8 to 5.5V, TSSOP-14So that's not a terrible price, especially in todays supply situation.You can search Digikey for MCU in TSSOP14, to get an idea what else is out there.That shows Nuvoton, TI and Microchip examples, with the Nuvoton 8k MS51DA9AE showing at 35c/1k, so has more flash and RAM but slightly lower MHz and less Vcc range. 2.4V ~ 5.5VThe larger 16k ML51DB9AE has wider 1.8V ~ 5.5V, but price is now 57c.1k and as you decided, the diminishing returns can easily make itnot worth the effort.

author: DavidAlfa
author_rank: Super Contributor
timestamp: May 29, 2021, 11:11:25 am
content: These single-cycle-instruction 8051s look nice!I can get the NM-Link for just 9€ on aliexpress. However I found almost impossible to source these chips!Waiting the day where these brands come to the rest of the world and start beating the competition.If I have to import them from the other side of the Earth then the shipping costs will totally destroy the savings!This is a personal project, selling in low quantities. 1K is crazy!RS can source the 16F18323 at 0.91€ in 10+ quantities.Found the 16LF1554 available at only 0.64€.The main difference is no EEPROM, but as I can write to flash I will buy these and modify the code.The eeprom is only used for storing settings when entering setup mode, not for frequent writes like some real-time system variable.So the wear is not a concern.Edit: Also no PPS, no capture/compare... Staying with the 18323!RS only charges 6€ for shipping, while Farnell, Digikey and others want 18€.

author: hans
author_rank: Super Contributor
timestamp: May 29, 2021, 12:00:15 pm
content: Quote from: DavidAlfa on May 28, 2021, 08:06:59 amThat Microchip MCU is already quite cheap for a "western" part (I don't like this classification, but for lack of a better word)..You could also look at some the ATTINY's, like the ATTINY424 or 824. It also has some built-in EEPROM, 3x 16-bit timers (1x timer with 3 compare outputs, other timers have capture input), a lot of SRAM and comparable program memory (considering that 3.5K flash in PIC land is approx 2K instructions, as is 4K flash for AVRs)Other option perhaps: PIC16F15223 or PIC16F15323, however, both have no EEPROM. Sounds like re-engineering the EEPROM usage to FLASH would be a cost saver in general.Both parts are about 40ct @ 100pcs at Mouser excl VAT.I'm not sure how many units you're pushing per year, but spending a few hours on saving 25ct in the MCU only becomes worthwhile if you're selling hundreds per month I suppose..

author: DavidAlfa
author_rank: Super Contributor
timestamp: May 29, 2021, 12:28:17 pm
content: Read, I discarded the 15xx series because they don't have PPS and capture compare, which I need.By no way I'm selling that much (yet). This is a device made for few specific vintage electronics, people die for these nowadays.I sell low numbers but they give a nice profit. After the 100s of hours spent on reading schematics, debugging and testing, now it's a 30 minute job (If the 3d printer doesn't go mad).Also I give friendly customer service and possibility of firmware customization, so it's a nice deal for everyone.Please don't spend any time with suggestions, as I said this is done, I'm keeping with microchip as I have everything running and working, not bothering for saving 0.3$/board.

author: NorthGuy
author_rank: Super Contributor
timestamp: May 29, 2021, 02:06:44 pm
content: Quote from: DavidAlfa on May 29, 2021, 11:11:25 amIt's USD 0.70 for 100+ on microchipdirect.com, or USD 0.65 for 1000+ if you open a business account with them.

author: DavidAlfa
author_rank: Super Contributor
timestamp: May 29, 2021, 02:34:58 pm
content: Yes, but I make 50 a year at best.A lot of things can happen in that time, in fact I've redesigned it few times already for adding compatibility with new devices... So I don't feel confortable buying high quantities.