Introduction to Microcontrollers - More On Interrupts
Interrupts are powerful but dangerous, and Mike Silva breaks down how they actually behave on microcontrollers and why they can corrupt data. This post explains latched flags, pending and priority behavior, ISR nesting, and common read-modify-write hazards, then shows practical fixes like targeted interrupt masking and using atomic GPIO hardware so you can stop chasing sporadic bugs.
Introduction to Microcontrollers - Interrupts
Interrupts are not magic, they are the practical tool that lets a microcontroller respond in microseconds while still doing background work. This introduction explains what an interrupt and an ISR are, how return addresses and CPU state are saved, and why ISRs must be short and carefully written. AVR and STM32 external-interrupt examples show real configuration steps and key gotchas to watch for.
Introduction to Microcontrollers - More On GPIO
Polarity matters: an output '1' does not always mean an LED lights, and inputs are just as picky. This post walks through LED driving basics, pull resistors for buttons, and practical bitwise techniques to read and write individual GPIO pins on AVR and STM32 boards. It also explains why polling rates and mechanical bounce make button handling trickier than it looks and what to watch for next.
Introduction to Microcontrollers - Hello World
Mike Silva walks through the classic embedded hello world by blinking an LED on both an AVR and an STM32. The tutorial covers GPIO configuration, bit manipulation, simple software delay loops, and common pitfalls such as compiler optimizations that can remove empty delays unless you use volatile. Practical wiring tips and debugging advice with a scope make this an ideal first lab for embedded engineers.
Introduction to Microcontrollers - Further Beginnings
Mike Silva walks through the CPU plumbing every embedded engineer needs to know before writing their first LED blinky. The post explains registers (data, address, stack pointer, link), the fetch-execute cycle, and the main instruction classes such as arithmetic, logic, shifts, branches, and call/return mechanics. Read this to see how C maps to CPU operations and why stack versus link register choices matter.
Introduction to Microcontrollers - Beginnings
Mike Silva's beginner tutorial series walks through core microcontroller concepts and practical steps to get started, from wiring an LED blinky to understanding startup code. He compares embedded and desktop programming, explains why C and assembly matter, and introduces AVR and STM32 Cortex-M3 toolchains and hardware. Expect clear examples, no-nonsense tool advice, and the essential hardware knowledge to move from simulator to a real board.
Introduction to Microcontrollers - Further Beginnings
Mike Silva walks through the CPU plumbing every embedded engineer needs to know before writing their first LED blinky. The post explains registers (data, address, stack pointer, link), the fetch-execute cycle, and the main instruction classes such as arithmetic, logic, shifts, branches, and call/return mechanics. Read this to see how C maps to CPU operations and why stack versus link register choices matter.
Introduction to Microcontrollers - Buttons and Bouncing
Mechanical buttons lie to your microcontroller, producing bounces and occasional noise that look like multiple presses. Mike Silva walks through practical ways to represent buttons, simple and robust software debounce strategies, and how to convert states into single-use events. The post includes ready-to-use C patterns: N-sample filters, shift-accumulator filtering, per-button data structures, and keypad debouncing examples.
Introduction to Microcontrollers - Adding Some Real-World Hardware
Two blinking LEDs only teach you so much, so Mike designed a docking board that adds a 4x20 HD44780 LCD, a 4x4 button matrix, four LEDs, DIP switches and an ADC potentiometer for AVR and STM32 experiments. This post shows how to wire and drive the HD44780 in 4-bit mode, calibrate microsecond and millisecond software delays, use the busy flag to speed writes, and includes AVR example code to get the display running.
Introduction to Microcontrollers - Ada - 7 Segments and Catching Errors
Mike demos an Ada implementation of a multiplexed 7-segment driver on the STM32F407 Discovery board, highlighting Ada idioms like protected objects for ISRs and packed-boolean GPIO mapping. The post shows practical timer setup for Timer 6, how to avoid ARR/CNT races, and how Ada's runtime range checks plus a last-chance handler surface out-of-range errors with file and line diagnostics.
Ada 2012 for ARM M3/M4 Released for Download
AdaCore's initial Ada 2012 port for ARM Cortex M3/M4 is now downloadable, and Mike Silva walks it through a hands-on demo on an STM32F4 Discovery board. He shows an Ada-written LCD driver, LED multitasking, and how Ada language features like Ada.Realtime, array slices, and unchecked conversions make low-level GPIO and timing code clearer and safer. The post highlights atomic BSRR GPIO writes and Ravenscar runtime details.
Ada 2012 Comes to ARM Cortex M3/M4
Ada is not dead, and Mike Silva shows why by walking through Ada 2012 running on ARM Cortex‑M3/M4 hardware. He demos an STM32F4 LED-and-button example that highlights Ada advantages: strong typing, modular types, built-in time and tasking, and protected objects for safe concurrency without an RTOS. The post also notes AdaCore's GNAT tooling and links to further resources to get started.
Introduction to Microcontrollers - More On Interrupts
Interrupts are powerful but dangerous, and Mike Silva breaks down how they actually behave on microcontrollers and why they can corrupt data. This post explains latched flags, pending and priority behavior, ISR nesting, and common read-modify-write hazards, then shows practical fixes like targeted interrupt masking and using atomic GPIO hardware so you can stop chasing sporadic bugs.
Introduction to Microcontrollers - Adding Some Real-World Hardware
Two blinking LEDs only teach you so much, so Mike designed a docking board that adds a 4x20 HD44780 LCD, a 4x4 button matrix, four LEDs, DIP switches and an ADC potentiometer for AVR and STM32 experiments. This post shows how to wire and drive the HD44780 in 4-bit mode, calibrate microsecond and millisecond software delays, use the busy flag to speed writes, and includes AVR example code to get the display running.
Introduction to Microcontrollers - More Timers and Displays
Mike Silva walks through using a single hardware timer to create the illusion of parallel tasks, combining a millisecond tick, deadline checks, and a cyclic executive to run time-driven and event-driven work. He shows safe deadline code that handles timer rollover and ISR races, and provides practical STM32 examples including SysTick-driven delays, atomic GPIO BSRR writes for LCD control, and a button-driven display demo.
Introduction to Microcontrollers - Ada - 7 Segments and Catching Errors
Mike demos an Ada implementation of a multiplexed 7-segment driver on the STM32F407 Discovery board, highlighting Ada idioms like protected objects for ISRs and packed-boolean GPIO mapping. The post shows practical timer setup for Timer 6, how to avoid ARR/CNT races, and how Ada's runtime range checks plus a last-chance handler surface out-of-range errors with file and line diagnostics.
Ada 2012 Comes to ARM Cortex M3/M4
Ada is not dead, and Mike Silva shows why by walking through Ada 2012 running on ARM Cortex‑M3/M4 hardware. He demos an STM32F4 LED-and-button example that highlights Ada advantages: strong typing, modular types, built-in time and tasking, and protected objects for safe concurrency without an RTOS. The post also notes AdaCore's GNAT tooling and links to further resources to get started.
Ada 2012 for ARM M3/M4 Released for Download
AdaCore's initial Ada 2012 port for ARM Cortex M3/M4 is now downloadable, and Mike Silva walks it through a hands-on demo on an STM32F4 Discovery board. He shows an Ada-written LCD driver, LED multitasking, and how Ada language features like Ada.Realtime, array slices, and unchecked conversions make low-level GPIO and timing code clearer and safer. The post highlights atomic BSRR GPIO writes and Ravenscar runtime details.







