3 ms·
Wow I assumed for a 10-cent microcontroller, it must be 8-bit, probably 16 bytes of RAM, no peripherals, etc... It's not like that at all!
by kats 3y ago
Wow I assumed for a 10-cent microcontroller, it must be 8-bit, probably 16 bytes of RAM, no peripherals, etc... It's not like that at all!
- brucehoult 3y agoPerhaps the biggest thing as a 10c microcontroller is that it uses FLASH for the program, so you can reuse it or iterate your code a lot of times. The 3c Padauk chips are OTP (One-Time Programmable). And 64 bytes RAM and 1k PIC-like instructions. 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).