> [!warning] This website is no longer maintained, see <https://jc.wippler.nl> instead. [Microcontrollers](https://en.wikipedia.org/wiki/Microcontroller) (µCs) are tiny computers. [C++](https://en.wikipedia.org/wiki/C%2B%2B) is a big programming language. The JeeH library helps bridge this gap (standing on the shoulders of [PlatformIO](https://platformio.org) and [Python](https://www.python.org)). One [raison d'être](https://www.merriam-webster.com/dictionary/raison%20d'être) for this site, is to show how C++ can be used in the world of embedded µCs without getting lost in language complexities. A second reason is to show that with some care, code can be written in a highly modular and decoupled fashion. Last but not least, this site acts as documentation for JeeH and its "preemptive event" model for real-time tasks. Note that URLs to pages on this website can break. Use search and (graph) navigation. ## Hello, World! We need some [[Hardware]] to run the code on and some specific [[Software]] to build it. Once set up, the first step is to run the embedded µC's equivalent of Hello World, i.e. [[Blinking an LED]]. The _next_ step will help to greatly simplify & speed up the development cycle: [[Adding a debug probe]]. With tooling complete, it's now time for a simple "Hello, World!" example: [[Serial console output]], and for [[Speeding things up]] a bit. That's it: *all basic preparations are now complete.* ## Interfacing to pins By [[Controlling GPIO pins]] we can connect to external hardware via [[Bit-banged I2C]] or [[Bit-banged SPI]]. Higher transfer speeds can be achieved using [[Polled hardware IO]], but both approaches need full attention from the CPU. When using [[DMA-based drivers]], data transfers can be off-loaded to let the CPU attend to other tasks (or go to sleep). The next step up is [[Hardware interrupts]], for which JeeH introduces [[Events and Tasks]]. This allows using an event-based [[Asynchronous code]] style which can support highly concurrent [Real-time](https://en.wikipedia.org/wiki/Real-time_computing) applications. ***To be continued ...*** %% ## Modular code JeeH tries to help with [[Writing modular code]], which can then be re-used without carrying over various assumptions or having to cater for all possible use cases. JeeH will [[Get µC details from SVD files]] and can manage configuration variants between µCs with an [[Inline code generator]]. ## STM32 peripherals Some built-in hardware components do not require any outside connections: they are either CPU-related: [[Clock, SysTick, WatchDog]], or of a more general nature: [[RTC, CRC, RNG, Cordic]]. Others connect to a variety of external circuits: [[UART, I2C, SPI, FMC]]. Some peripherals are designed for specific tasks: either digital, e.g. [[QSPI, SDIO, TIM]], or related to analog signals, i.e. [[ADC, DAC, COMP, OpAmp]]. Lastly, some µCs have very extensive special-purpose peripheral hardware built in, such as [[USB, CAN, Ethernet]] and [[LCD, Graphics, Audio]]. JeeH doesn't tie into all of the above, but it has conventions to help write such drivers with reasonable effort. %%