STC microcontrollers sometimes comes with built-in ADC. It can be a little bit tricky to use as the relevant pins have to be switched between analog and digital mode.
It is finally the time to get the chip to speak up – start communicating over the serial link. Keeping true to the nature of my previous example code, the serial driver code will adapt to the oscillator frequency and baudrate you wish to use.
Remember back in part 3 I wrote the timing code? That code only works with a 24MHz clock. And I didn’t have the watchdog running yet. So I am gonna fix it.
The bug I encountered on STC15W4K61S4 is resolved: this chip, being much more complicated than the traditional 8051 my textbooks was written for, have a bit of quirks that can break code compatibility between them.
I am digging deeper into the STC 8051 ecosystem by attempting to write my first bits of actual code on this platform. This experiment took me a few days to execute as I need to wrestle a few bugs along the way, and ended up getting me ordering a few samples from STC directly.
STC proudly claims that their MCU are fast. And from what I see in their core clock timing table they have a new core design that accelerated the instructions a lot. So how fast is it? Continue reading Exploring STC MCU Part 2 – So how fast is it?
It seem to me that there are some interest in ultra cheap microcontrollers. The Chinese brand STC makes a few 8051-compatible MCU which sells at ridiculously cheap prices.