4 ms·
They don't usually run an OS. But are structured like void setup_code() { // configure SPI // analog to digital converters // timers // fix i
by sitkack 13y ago
They don't usually run an OS. But are structured like
void setup_code() {
// configure SPI
// analog to digital converters
// timers
// fix internal and external buggy hardware
}
void interrupt_handler() {
TURN_OFF_INTERRUPTS;
// packet recv
// time expired
// etc
TURN_ON_INTERRUPTS;
}
setup_code();
register_interrupt_handler(interrupt_handler);
while(1) {
// application code
}
Microcontrollers like this only have 2k of working state, the presentable complexity is in the code, not the data.