Welcome on PLAY Embedded

On PLAY Embedded you can find useful resources to getting started with embedded systems: media, examples and accurate descriptions are also provided. Come on, learn by doing!
Wide box Tiny box List
Ascent Descent

Sampling and dimming (ADC and PWM)

Sampling and Dimming

An Analog to digital converter is a device that converts a continuous physical quantity (usually voltage) to a digital number that represents the quantity’s amplitude.

In this demo, we are sampling voltage across a potentiometer to establish its position. A potentiometer is a three-pin knob that provides a variable resistance between W-A and W-B pins (Fig.1). Amount of resistance between A and B is constant, but by turning the shaft of the potentiometer, we change the amount of resistance on either side of W.

Connecting A to 3 V, B to GND (or vice versa) and sampling continue reading...

Meeting SPI

Meeting SPI

Communicating by a serial bus instead of a parallel one could be very useful when we need to send out a big number of words or fixing a constraint on wires. The Serial Peripheral Interface bus, also known as SPI bus, is a synchronous, serial communication peripheral which communicates in full duplex mode using a master-slave architecture with a single master. That means we have always a single master and one or more slaves. The communications is bi-directional (i.e. data flows from master to slave but also from slave to master). Since this bus is synchronous, the master continue reading...

Hello ChibiOS

Hello ChibiOS

One of most important feature of ChibiOS is multi-threading. Oversimplifying, a thread could be imagined like a sequence of instructions (with associated a priority and a working area) and multi-threading means kernel can manage more than a thread independently, executing them in a parallel fashion even if there is a single core.

Achieving this requires Kernel must plan operation sequence: this task is called scheduling. We could act indirectly on this operation though priority levels. Priority follows a simple rule:

among all the threads ready for execution, the one with continue reading...

A quick view of ChibiStudio

A quick view of ChibiStudio

We have said more than once that ChibiStudio is Eclipse based, therefore, should not surprise that project management is based on Eclipse rules. In Eclipse a C project is a folder containing basically a main.c, a makefile and two additional files used by eclipse to manage projects: .project and .cproject.

A ChibiOS based projects contains also three additional files:

chconf.h, containing configuration related to kernel. As example, here it is possible to configure system timing, enable/disable kernel features and enable/disable debug options; halconf.h, containing continue reading...

How to setup ChibiStudio

Setup of ChibiStudio

Following the video we will install ChibiStudio. Note that in what follows when we will say “ChibiOS” we will refer to ChibiOS/RT, the Real Time kernel.

In the tutorial related to ChibiOS we will use an STM32 Nucleo-64 F401RE and we suggest to use the same. This board belong to STM32 MCUs family and is one of the cheapest and well designed MCUs you can found today.

This board costs more or less 10$ and exhibit almost the highest performances you can found on MCU‘s market today. This board has indeed anSTM32F401RE: an ARM CORTEX-M4 MCU with clock frequency up to 84 MHz, continue reading...