WCH Launches a Sub-10¢ RISC-V Microcontroller (2022)
hackster.io
hackster.io
I don't know what volume you need to get under 10c. You can get 50 of the 8 pin ones from the official WCH store on Aliexpress for 10c each, or 50 of the 20 pin ones for last time I looked 14.3c each.
There is now also a "nano" style dev board with a 20 pin chip on it for $1.50.
If you want more, write directly to WCH, they are friendly and responsive. @patrick_riscv on Twitter, or email sales@wch.cn
https://www.cnx-software.com/2022/07/14/yd-ch32v307vct6-risc...
I'm hoping the platform picks up more momentum in this particular vertical. Designs are outgrowing the tiny AVR Pro Micro and equivalent controllers, but it seems to be ending up in a thousand different ARM flavours at this point.
I have an almost-fully-working GDB remote stub up at https://github.com/aappleby/PicoRVD that allows flashing, debugging, breakpoints, stepping, etc and only requires a Pi Pico and one resistor - no proprietary dongle or modified OpenOCD needed.
For example, if targeting a 10¢ microcontroller that will be unavailable and therefore prevent you from fulfilling 10,000 orders, then the opportunity cost is much higher than the cost savings from using a less expensive chip (since the opportunity cost includes all of the profit from all of the orders you aren't able to fulfill due to the shortage.)
On the other hand, if it is not subject to a chip shortage then it can be a source of BOM savings that increase the profit margin.
Generally speaking most demand curves are such that there is overwhelming demand at low prices (leading to a shortage) and more reasonable levels of demand at higher prices.
This CH32V003 is a full 32 bit CPU with powerful 3-address 4-byte long instructions e.g. A = B + C, where A, B, C can all be different variables, C can be a constant in -2048..+2047, and the operation can be +,-,&,|,^,<<,>>,==,!=,<,>= (so A = B < C sets A to 1 if B < C or to 0 if not). Plus if A and B are the same variable you can use a shorter 2-byte instruction instead (about 50% to 60% of the time usually).
So you've got 2 KB RAM and 16 KB flash, which is enough for typically 5000-6000 instructions (worth at least 10k PIC instructions, much more if you're using 16 bit or 32 bit data).