This is a companion repository for Making Embedded Systems, 2nd Ed. by Elecia White.
Some example processor documents, obtained from their vendors:
-
ATtiny AVR Microcontroller Datasheet (remote) and the application note AVR 130: Setup and Use the AVR Timers
-
STM32F103 Reference Manual (remote) and github repository, specifically stm32f103x6.h
Showing my math for the timer calculation section:
See also STM32 Delay Microsecond Millisecond Utility: a blog post about different ways to set up timer delays
A Guide to Debouncing by Jack Ganssle. Hackaday has code for multiple different implementations
For understanding and practicing hex and bitwise operations:
- YouTube: Bit Hacks from Beginner to Advanced is an excellent video
- calc.50x.ca provides a hex calculator showing the binary values
- bitwiseCmd lets you try out bitwise operations online
- For more bit twiddling hacks and seeing how you can do optimal things (usually at the cost of readability), check out Stanford Graphics Bithacks
-
PWM on Raspberry Pi Pico, example on Wokwi
-
More complex PWM on Raspberry Pi Pico example on Wokwi
-
FIXME: Button interface with debouncing
-
FIXME: Dependency injection example
If you like what's here, please consider buying the book: Making Embedded Systems, 2nd Ed. by Elecia White