Working with Microchip PIC 8-bit GPIO
The third in a series of five posts looks at GPIO with PIC 8-bit microcontrollers. After a detailed review of the registers for configuring and managing GPIO on the PIC18F47Q10 processor, a basic application is stood up programming those registers to blink external LEDs at 0.5Hz.
Creating a Hardware Abstraction Layer (HAL) in C
In my last post, C to C++: Using Abstract Interfaces to Create Hardware Abstraction Layers (HAL), I discussed how vital hardware abstraction layers are and how to use a C++ abstract interface to create them. You may be thinking, that’s great for C++, but I work in C! How do I create a HAL that can easily swap in and out different drivers? In today’s post, I will walk through exactly how to do that while using the I2C bus as an example.
Getting Started With Zephyr: Devicetree Overlays
In this blog post, I show how the Devicetree overlay is a valuable construct in The Zephyr Project RTOS. Overlays allow embedded software engineers to override the default pin configuration specified in Zephyr for a particular board. In this blog post, I use I2C as an example. Specifically, I showed the default I2C pins used for the nRF52840 development kit in the nominal Zephyr Devicetree. Then, I demonstrated how an overlay can be used to override this pin configuration and the final result.
STM32 B-CAMS-OMV Walkthrough
Want to prototype embedded vision quickly? This walkthrough shows how the STM32 B-CAMS-OMV camera module pairs with the STM32H747I-DISCO discovery kit and the FP-AI-VISION1 function pack to get you running in minutes. The video covers the camera connection interface, key software functions to control and process data, and the ISP features that let image processing run inside the camera. The STM32 H7 project with B-CAMS-OMV drivers is available on GitHub.
Libgpiod - Toggling GPIOs The Right Way In Embedded Linux
Accessing GPIOs through sysfs is simple but fragile, causing race conditions when multiple userspace processes touch the same line. This post explains libgpiod, introduced in Linux 4.8, and shows concise Python examples on a Toradex Verdin iMX8M Plus for requesting lines, tagging the consumer, using active_low flags, and reading or driving values. Learn why libgpiod provides safer, atomic GPIO handling.
How to Give Persistent Names To USB-Serial Devices on Ubuntu 14.04
When your dock reshuffles ttyUSB assignments, Tayyar shows how to bind USB-serial devices to persistent names on Ubuntu 14.04. The post walks through using dmesg and udevadm to locate unique attributes like KERNELS and ATTRS{serial}, creating /etc/udev/rules.d entries with NAME and SYMLINK, and applying rules with udevadm trigger. It includes common pitfalls and quick fixes to get minicom talking to the right port.
Handling latency in data acquisition systems
In recent projects, I found myself working with data acquisition systems. For instance: PCIe/10GbE readouts for 2D XRay detectors (RASHPA slides, RASHPA paper) instruments mixing 1D signal acquisition and triggering, microcontroller based system for audio transmission: (NRF spearker)
Data Validity in Embedded Systems
Real-world sensors and serial links often deliver garbage, and embedded software must recognize and handle invalid inputs before they cause failures. In this post Stephen Friederichs walks through practical validity checks, from simple range tests and sentinel values to hardware status flags and timing checks for stale data. He also outlines safe responses, from graceful degradation to fail-safe shutdowns, so firmware behaves predictably in the unexpected.
A simple working I2C (TWI) level shifter
When interfacing 3.3V and 5V boards, Dr Cagri Tanriover shows a no-fuss MOSFET solution to keep I2C talking across voltages. The post walks through using the NXP MOSFET level-shifter idea with BS170 transistors and 10 kΩ pull-ups, notes it ran at 400 kbps for his setup, and includes a quick four-step test to verify the build before connecting microcontrollers.
LCD Control with an MCU
Dr Cagri Tanriover set out to add a cheap 2x16 JHD162A LCD to an MCU project and ran into surprisingly opaque datasheets and quirky behavior. This post walks through the wiring, a reliable initialization sequence, contrast troubleshooting, and practical scrolling and CGRAM tips that saved debugging time. Read it for hands-on fixes and gotchas that datasheets often omit.
Creating a Hardware Abstraction Layer (HAL) in C
In my last post, C to C++: Using Abstract Interfaces to Create Hardware Abstraction Layers (HAL), I discussed how vital hardware abstraction layers are and how to use a C++ abstract interface to create them. You may be thinking, that’s great for C++, but I work in C! How do I create a HAL that can easily swap in and out different drivers? In today’s post, I will walk through exactly how to do that while using the I2C bus as an example.
Getting Started With Zephyr: Devicetree Overlays
In this blog post, I show how the Devicetree overlay is a valuable construct in The Zephyr Project RTOS. Overlays allow embedded software engineers to override the default pin configuration specified in Zephyr for a particular board. In this blog post, I use I2C as an example. Specifically, I showed the default I2C pins used for the nRF52840 development kit in the nominal Zephyr Devicetree. Then, I demonstrated how an overlay can be used to override this pin configuration and the final result.
Working with Microchip PIC 8-bit GPIO
The third in a series of five posts looks at GPIO with PIC 8-bit microcontrollers. After a detailed review of the registers for configuring and managing GPIO on the PIC18F47Q10 processor, a basic application is stood up programming those registers to blink external LEDs at 0.5Hz.
Libgpiod - Toggling GPIOs The Right Way In Embedded Linux
Accessing GPIOs through sysfs is simple but fragile, causing race conditions when multiple userspace processes touch the same line. This post explains libgpiod, introduced in Linux 4.8, and shows concise Python examples on a Toradex Verdin iMX8M Plus for requesting lines, tagging the consumer, using active_low flags, and reading or driving values. Learn why libgpiod provides safer, atomic GPIO handling.
C++ on microcontrollers 1 - introduction, and an output pin class
Wouter van Ooijen shows how small C++ abstractions make GPIO code portable and reusable. Starting from a simple output_pin interface he implements concrete pins for an LPC2148 GPIO and a 74HC595 shift register, then composes behaviors with wrappers like tee and invert. The post demonstrates virtual methods, references, and constructor initialization lists to build drivers you can reuse across boards.
How to Give Persistent Names To USB-Serial Devices on Ubuntu 14.04
When your dock reshuffles ttyUSB assignments, Tayyar shows how to bind USB-serial devices to persistent names on Ubuntu 14.04. The post walks through using dmesg and udevadm to locate unique attributes like KERNELS and ATTRS{serial}, creating /etc/udev/rules.d entries with NAME and SYMLINK, and applying rules with udevadm trigger. It includes common pitfalls and quick fixes to get minicom talking to the right port.
STM32 B-CAMS-OMV Walkthrough
Want to prototype embedded vision quickly? This walkthrough shows how the STM32 B-CAMS-OMV camera module pairs with the STM32H747I-DISCO discovery kit and the FP-AI-VISION1 function pack to get you running in minutes. The video covers the camera connection interface, key software functions to control and process data, and the ISP features that let image processing run inside the camera. The STM32 H7 project with B-CAMS-OMV drivers is available on GitHub.
A simple working I2C (TWI) level shifter
When interfacing 3.3V and 5V boards, Dr Cagri Tanriover shows a no-fuss MOSFET solution to keep I2C talking across voltages. The post walks through using the NXP MOSFET level-shifter idea with BS170 transistors and 10 kΩ pull-ups, notes it ran at 400 kbps for his setup, and includes a quick four-step test to verify the build before connecting microcontrollers.
LCD Control with an MCU
Dr Cagri Tanriover set out to add a cheap 2x16 JHD162A LCD to an MCU project and ran into surprisingly opaque datasheets and quirky behavior. This post walks through the wiring, a reliable initialization sequence, contrast troubleshooting, and practical scrolling and CGRAM tips that saved debugging time. Read it for hands-on fixes and gotchas that datasheets often omit.
C++ on microcontrollers 4 – input pins, and decoding a rotary switch
Wouter van Ooijen shows how to extend a small C++ I/O library for microcontrollers to support input pins and mixed I/O, and how to decode a rotary switch reliably. The post walks through a safe class hierarchy for input, output, and bidirectional pins, then builds a quadrature decoder with a saturating counter and an HC595 seven-segment demo you can run on LPCXpresso hardware.
C++ on microcontrollers 1 - introduction, and an output pin class
Wouter van Ooijen shows how small C++ abstractions make GPIO code portable and reusable. Starting from a simple output_pin interface he implements concrete pins for an LPC2148 GPIO and a 74HC595 shift register, then composes behaviors with wrappers like tee and invert. The post demonstrates virtual methods, references, and constructor initialization lists to build drivers you can reuse across boards.
Creating a Hardware Abstraction Layer (HAL) in C
In my last post, C to C++: Using Abstract Interfaces to Create Hardware Abstraction Layers (HAL), I discussed how vital hardware abstraction layers are and how to use a C++ abstract interface to create them. You may be thinking, that’s great for C++, but I work in C! How do I create a HAL that can easily swap in and out different drivers? In today’s post, I will walk through exactly how to do that while using the I2C bus as an example.
How to Give Persistent Names To USB-Serial Devices on Ubuntu 14.04
When your dock reshuffles ttyUSB assignments, Tayyar shows how to bind USB-serial devices to persistent names on Ubuntu 14.04. The post walks through using dmesg and udevadm to locate unique attributes like KERNELS and ATTRS{serial}, creating /etc/udev/rules.d entries with NAME and SYMLINK, and applying rules with udevadm trigger. It includes common pitfalls and quick fixes to get minicom talking to the right port.
Libgpiod - Toggling GPIOs The Right Way In Embedded Linux
Accessing GPIOs through sysfs is simple but fragile, causing race conditions when multiple userspace processes touch the same line. This post explains libgpiod, introduced in Linux 4.8, and shows concise Python examples on a Toradex Verdin iMX8M Plus for requesting lines, tagging the consumer, using active_low flags, and reading or driving values. Learn why libgpiod provides safer, atomic GPIO handling.
Getting Started With Zephyr: Devicetree Overlays
In this blog post, I show how the Devicetree overlay is a valuable construct in The Zephyr Project RTOS. Overlays allow embedded software engineers to override the default pin configuration specified in Zephyr for a particular board. In this blog post, I use I2C as an example. Specifically, I showed the default I2C pins used for the nRF52840 development kit in the nominal Zephyr Devicetree. Then, I demonstrated how an overlay can be used to override this pin configuration and the final result.
C++ on microcontrollers 4 – input pins, and decoding a rotary switch
Wouter van Ooijen shows how to extend a small C++ I/O library for microcontrollers to support input pins and mixed I/O, and how to decode a rotary switch reliably. The post walks through a safe class hierarchy for input, output, and bidirectional pins, then builds a quadrature decoder with a saturating counter and an HC595 seven-segment demo you can run on LPCXpresso hardware.
Working with Microchip PIC 8-bit GPIO
The third in a series of five posts looks at GPIO with PIC 8-bit microcontrollers. After a detailed review of the registers for configuring and managing GPIO on the PIC18F47Q10 processor, a basic application is stood up programming those registers to blink external LEDs at 0.5Hz.
A simple working I2C (TWI) level shifter
When interfacing 3.3V and 5V boards, Dr Cagri Tanriover shows a no-fuss MOSFET solution to keep I2C talking across voltages. The post walks through using the NXP MOSFET level-shifter idea with BS170 transistors and 10 kΩ pull-ups, notes it ran at 400 kbps for his setup, and includes a quick four-step test to verify the build before connecting microcontrollers.
C++ on microcontrollers 3 – a first shot at an hc595 class with 8 output pins
This blog series is about the use of C++ for modern microcontrollers. My plan is to show the gradual development of a basic I/O library. I will introduce the object-oriented C++ features that are used step by step, to provide a gentle yet practical introduction into C++ for C programmers. Reader input is very much appreciated, you might even steer me in the direction you find most interesting.
In the first part of...
LCD Control with an MCU
Dr Cagri Tanriover set out to add a cheap 2x16 JHD162A LCD to an MCU project and ran into surprisingly opaque datasheets and quirky behavior. This post walks through the wiring, a reliable initialization sequence, contrast troubleshooting, and practical scrolling and CGRAM tips that saved debugging time. Read it for hands-on fixes and gotchas that datasheets often omit.















