Hacker News new | ask | show | jobs
by kjs3 724 days ago
Ya...8051s are literally everywhere, and there's a vast ecosystem of code and programmer talent to draw on.
1 comments

Yes but... modern 8051 has grossly different peripherals / drivers than the original.

Most of your code / effort will be in getting these peripherals to work. A ton of microcontroller programming is a simple if(voltage>0.5V) then {setup peripherals to do Y}.

In fact, voltage > 0.5V is a peripheral (aka: the Analog Comparator + DAC loopback) on most uCs today. So in practice its:

"If (analog comparator) then {do Y}".

Except "if analog comparator" is itself an interrupt that you put into the interrupt table, so that the processor can sleep for minimum power usage. So really its all just configuration of interrupt table handlers, configuration of various peripherals, and then a massive amounts of sleep.