Hardware demo · low-level systems

Hardware / Low-Level

Mini OS • Advanced OS • PIC microcontroller • Timer interrupts • Task scheduling

Restored hardware demo integrated into the same unified maximinfo.com portfolio menu as the other projects.

Embedded systems demo

Mini OS

A minimal scheduler demonstrating periodic ticks, flags, low-level timing, and interrupt-driven task execution.

Operating systems

Advanced OS

Advanced operating-system video reference linked directly to the original YouTube video.

System concepts

Timer interrupt

Periodic hardware tick for regular scheduler updates.

Task flags

Interrupt service routine sets flags; the main loop executes pending tasks.

Low-level C

Microcontroller-oriented code structure with explicit timing control.

Source code

Mini OS scheduler sketch

/* Minimal hardware scheduler sketch */
volatile unsigned char tick_1ms = 0;
volatile unsigned char task_a_ready = 0;
volatile unsigned char task_b_ready = 0;

void interrupt isr(void) {
    if (TMR0IF) {
        TMR0IF = 0;
        TMR0 = 6;
        tick_1ms++;
        if ((tick_1ms % 10) == 0) task_a_ready = 1;
        if ((tick_1ms % 50) == 0) task_b_ready = 1;
    }
}

void main(void) {
    init_timer0();
    while (1) {
        if (task_a_ready) { task_a_ready = 0; task_a(); }
        if (task_b_ready) { task_b_ready = 0; task_b(); }
        sleep_until_interrupt();
    }
}