How vidhyamadhavivemuri-spec/microcontroller-register-simulator works
This is a software-only embedded microcontroller simulator. Its runtime demonstrates peripheral activity flowing through interrupts and events to application decisions, system-state changes, and alert output; it also exposes standalone simulated GPIO, UART, PWM, SPI, and I2C peripherals. The README describes the broader peripheral behavior; sampled source confirms the application, interrupt, event, SPI, and I2C implementations, but not every peripheral’s internal wiring.
Main entry points: main.c Simulator Main · register.c Simulated Registers · application.c Application Logic · interrupt.c Interrupt Controller
Components 15
Simulated Hardware
- Simulated Registers
src/register.c - GPIO
src/gpio.c - UART
src/uart.c - Timer
src/timer.c - ADC
src/adc.c - PWM
src/pwm.c - SPI
src/spi.c - I2C
src/i2c.c - Watchdog Timer
src/wdt.c
Interrupt and Events
- Interrupt Controller
src/interrupt.c - Event Flags
src/events.c
Application Response
- Application Logic
src/application.c - System State
src/system.c - Alert Output
src/alert_output.c
Runtime Entry
- Simulator Main
src/main.c
Connections 23
- Simulator Main → Interrupt Controller: initializes and configures
- Simulator Main → Application Logic: initializes and processes
- Simulator Main → Timer: starts and updates
- Simulator Main → ADC: starts and updates
- Simulator Main → Watchdog Timer: enables and updates
- GPIO → Simulated Registers: reads and writes
- UART → Simulated Registers: reads and writes
- Timer → Simulated Registers: reads and writes
- ADC → Simulated Registers: reads and writes
- PWM → Simulated Registers: reads and writes
- SPI → Simulated Registers: reads and writes
- I2C → Simulated Registers: reads and writes
- Watchdog Timer → Simulated Registers: reads and writes
- Timer → Interrupt Controller: triggers interrupt
- ADC → Interrupt Controller: triggers interrupt
- Watchdog Timer → Interrupt Controller: triggers INT2
- Interrupt Controller → Simulator Main: dispatches handlers
- Simulator Main → Event Flags: handlers set events
- Application Logic → Event Flags: checks and clears
- Application Logic → ADC: reads conversion
- Application Logic → System State: updates state
- Application Logic → Alert Output: controls output
- Simulator Main → Simulated Registers: reads status