Software Design

Wide box Tiny box List
Ascent Descent

How to drive a HD44780 with I2C backpack with a STM32

How to drive a HD44780 with I2C backpack with a STM32

The HD44780 is a de-facto standard controller for display. We have already use it providing a source code to use a 16×2 LCD with a STM32. In this article we will step over introducing an I2C backpack for that display. Of course we will explain how to edit old code in order to get it work with this new hardware configuration.

Even if it is still popular, this controller was made commercially available in the late eighties. At that time serial communications were not so widespread because their were costly and involved constraint about clock speed. Because of that, the continue reading...

Port a ChibiOS based application to another platform

Port a ChibiOS based application to another platform

We already talked about ChibiOS/HAL design and its multiple architectures support. This is very important for regular developers: imagine a scenario in which you design an application using a certain MCU and after a first stage you decide to upgrade your application. Imagine also that hardware resources on the MCU you decided to use are not enough to make that upgrade. At that point you have to port application on another MCU and this could cost a big effort in terms of time/money. If your application is ChibiOS based and you followed some guidelines already introduced in continue reading...

ChibiOS/HAL design: an object-oriented approach

ChibiOS/HAL design an object-oriented approach

We already introduced ChibiOS/HAL in early tutorial Hello ChibiOS and we used it in almost every article ChibiOS related. We had often ignored its design or how it works, indeed read its documentation is all you need to use it. Anyway, this article is for those who want to go into detail and see how stuff works. Starting from ChibiOS 3.0, ChibiOS/HAL became essentially a separate product that is not rigidly attached to the OS and can be used on bare metal or in conjunction with any other RTOS.

ChibiOS/HAL aspires to provide a hardware abstraction allowing nevertheless a continue reading...

C Library design for embedded applications: tips and hints

C Library design: tips and hints

Write reusable code is one of the most powerful and time-saving thing that an embedded programmer should learn. Compose well-arranged libraries makes things easiest, especially when we want to add old code in a new project. Citing one of the most talented programmers I have ever met, “Well done code should be like a LEGO: must fit perfectly and without any effort”. So a good library should be quite abstract, with a simple hierarchy and should provide some well documented APIs.

Even if this is a generic embedded article, we will provide some concrete example.

When we want continue reading...

How to use an HD44780 based Liquid Crystal Display

How to use an HD44780 based Liquid Crystal Display

The HD44780 is a controller for display developed by Hitachi commonly used to manage alphanumeric dot matrix LCD. This controller is a standard de-facto for this kind of display. It is often used in industrial test equipment, networking equipment, vending machine and in embedded projects.

Compatible LCD screens are manufactured in several standard configurations. Common sizes are one row of eight characters (1×8), as well as 16×2, 20×2 and 20×4 formats. Larger custom sizes are made with 32, 40 and 80 characters and with 1, 2, 4 or 8 lines. The most commonly manufactured continue reading...