EmbeddedRelated.com

Wouter van Ooijen (@wovo)

I am a programmer by education and a electronics tinkerer by passion. I have worked in embedded systems (process industry, space, military). Currently I run my webshop and teach embedded programming.

C++ on microcontrollers 4 – input pins, and decoding a rotary switch

Wouter van OoijenWouter van Ooijen November 12, 20112 comments

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 3 – a first shot at an hc595 class with 8 output pins

Wouter van OoijenWouter van Ooijen November 2, 2011

 previous parts: 1, 2

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...


C++ on microcontrollers 2 - LPCXpresso, LPC-link, Code Sourcery, lpc21isp, linkerscript, LPC1114 startup

Wouter van OoijenWouter van Ooijen October 24, 20115 comments

Wouter van Ooijen walks you through getting C++ to run on a tiny LPC1114 board using LPCXpresso hardware and a command-line toolchain. He demonstrates a minimal linker script and startup code that initialize .data and .bss and call C++ global constructors, shows how to flash via the on-chip bootloader with lpc21isp when LPC-link is locked, and includes practical GPIO and SysTick LED examples.


C++ on microcontrollers 1 - introduction, and an output pin class

Wouter van OoijenWouter van Ooijen October 9, 20117 comments

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.


No Threads Found

Use this form to contact wovo

Before you can contact a member of the *Related Sites:

  • You must be logged in (register here)
  • You must confirm you email address