So how can we represent the embedded hierarchy in software? Before we can answer this question, we must make our goals clear: setting up and defining a new board should be as easy as possible, and code re-use should be optimal. With these goals in mind, it is useful to divide the hardware hierarchy into […]
The embedded hierarchy — Part 1
Good programming skills is not the only quality a software engineer needs to have in order to write extendable, reusable and manageable software. Understanding the domain is equally important because it enables you to build good abstractions, and to do correct configuration management (version control). This is no different in embedded software: creating or even […]
Storing settings and data on an embedded device
Every once and a while, one needs to persistently store settings, information or other data on an embedded device. This poses risks. There are a few (simplified) categories of embedded data storage solutions to look at. More ‘advanced’ and relatively larger embedded systems… …use file systems. Many times, we have heard it is a question […]
STM32F100: configuring two PWM channels, polarity and alignment
Introduction In our project one source supplies power to two different loads and we need to control how much power goes to which load. To achieve this, we use an STM32F100 processor to PWM high-power mosfets. These mosfet channels do or do not conduct green energy to the different loads which are a battery (bank) […]
Filtering sensor data
I²C and SPI
Embedded device communication
An embedded device does not do its job in the ‘void’. It needs to interact (and communicate) with users and/or other devices. Even inside an embedded device, lots of communication is required between controllers and (external) peripherals, sensors and actuators. Communication properties In general communication happens one to one (e.g. a telephone call via a […]
STM32F100: why and how to use the internal reference voltage for ADC?
One of our main development boards is the STM32VLDISCOVERY. Its st-link is an in-circuit debugger and programmer, and makes development for prototyping fast and easy. The board has an ‘interesting’ property though: its reference voltage is labeled 3.3V while it is actually… only 3V. Check out the picture for proof! After reviewing the board schematics we found […]
Pulse Width Modulation
A short definition Pulse-width modulation is commonly used in power-control or motor-control applications. Time is divided into periods. As always, the smaller the time periods, the higher the frequency. Within this time block a pulse signal is applied. The digital signal is logically active (“1”or ON) during a specified percentage of the time period, the […]
ADC driver for the energy harvester
Introduction One of the goals of iteration 1 of the energy harvester project is to extend our software platform with drivers for measuring (gpio in, adc), controlling (gpio out, pwm) and debugging (uart). In this article our focus is set on the ADC driver (we already introduced the Analog-to-Digital-Converter here). It is hard (not to say […]
Recent Comments