---
title: "C++ on microcontrollers 3 – a first shot at an hc595 class with 8 output pins"
url: https://daily.dev/posts/c-on-microcontrollers-3-a-first-shot-at-an-hc595-class-with-8-output-pins-nub6475qg
source_url: https://www.embeddedrelated.com/showarticle/106.php
type: article
source: "EmbeddedRelated"
published: 2026-05-31T07:48:39.804Z
updated: 2026-05-31T09:11:07.474Z
tags: ["general-programming", "c++", "embedded"]
reading_time: 10
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# C++ on microcontrollers 3 – a first shot at an hc595 class with 8 output pins

**[EmbeddedRelated](https://daily.dev/sources/embeddedrelated)** · 10 min read · 0 upvotes · 0 comments

## Summary

A practical walkthrough of building a C++ I/O abstraction for the HC595 shift register on an LPC1114 microcontroller. The author creates an `output_pin_595` class that inherits from `output_pin`, allowing individual HC595 outputs to be used interchangeably with native MCU pins. Key C++ concepts covered include forward declarations to resolve circular class dependencies, out-of-class method definitions, and the `this` pointer. The pattern is then generalized to MCU port objects and demonstrated with daisy-chained HC595 chips, where outputs of one chip drive the control lines of the next.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.embeddedrelated.com/showarticle/106.php>

---

Tags: [#general-programming](https://daily.dev/tags/general-programming), [#c++](https://daily.dev/tags/c++), [#embedded](https://daily.dev/tags/embedded)

[View this post on daily.dev](https://daily.dev/posts/c-on-microcontrollers-3-a-first-shot-at-an-hc595-class-with-8-output-pins-nub6475qg)
