Articles

Article are the best way to explore the topics covered on PLAY Embedded. You will find detailed texts, videos, explanatory images, schematics, code examples, ready to use projects and much more. Pick one and read, and if you like it don’t forget to Share the knowledge!

Wide box Tiny box List
Ascent Descent

Dealing with LEDs using a STM32

This article includes some simple examples to understand how to deal with LEDs when you are approaching STM32 and ChibiOS. The LED can be considered the simplest peripheral output you can connect to a microcontroller. Because of that, usually, every embedded development board is equipped with a LED marked as “User LED” and this means that it is actually connected to a GPIO pin you can drive via software.

To understand this article with proficiency you should match few requirements:

You should have a STM32 development kit and be able to do basic stuff with ChibiStudio continue reading...

Using STM32 I2C with ChibiOS

How to drive a HD44780 with I2C backpack with a STM32

The Inter-Integrated Circuit (often shored as I2C or I2C bus pronounced I-squared-C or alternatively I-two-C) is a widely used synchronous serial communication peripheral which communicates in half duplex mode using a multi-master-multi-slave architecture.

Like the SPI, the I2C is a Synchronous Serial bus, and the clock signal is generated by one of the endpoint and provided to the others through a specific Serial Clock Line often shorted as SCL by a party which is named Master.

In half-duplex buses, the communication happens on the same line no matter the direction. The continue reading...

Using STM32 SPI with ChibiOS

The Serial Peripheral Interface (often shored as SPI bus) is a widely used synchronous serial communication peripheral which communicates in full duplex mode using a master-slave architecture with a single master.

As the SPI is a Synchronous Serial bus, a clock signal is generated by one of the endpoint and provided to the others through a specific Serial Clock Line often shorted as SCL or CLK. The communication party which generates the clock is named Master while other Slaves.

In full-duplex buses, the communication is simultaneously bi-directional, i.e. data can flow continue reading...

PWM in hardware with STM32 Timer and ChibiOS

The Pulse Width Modulation (also known as PWM) is a digital modulation technique which uses duty-cycle of square waves to encode information. In communication field PWM surrendered to more advanced communication technique which uses more complex waveforms showing better noise rejection ratio and less transmission errors at highest data rate. Nevertheless, PWM is still used in infrared communication where data rate is very low but transmitter and receiver are cheap.

Anyway low rate communication is not the most relevant use case of PWM which is widely used in many fields continue reading...

Using STM32 ADC with ChibiOS ADC Driver

A microcontroller is a system which works on bits and bit streams more than analog signals, anyway those signals are still widely used in many fields especially in audio and power applications. An Analog to Digital Converter (or ADC) is a system that converts such kind of signals in a sequence of discrete values directly interpretable by the microcontroller. Such kind of converter is widely used in embedded systems to deal with those peripherals which works with analog signals like potentiometers, analog microphones or sensors.

Some examples?

Analog sensors which continue reading...