Category: Uncategorized

From AVR to STM32: An introduction to ‘Bare Metal’-programming the Arm-Cortex-M4(R) MCUs (Lesson 10: I2C)

Abstract This uni of our online tutorial will cover the implementation, configuration and usage of I2C communication with the STM32F4 MCUs. Later we will show practical examples, that can be used for driving an SH1106 OLED display for example or a 24C65 external EEPROM. I2C basics I2C (spoken “I square C” for inter-integrated circuit) has…

Read the full article

From AVR to STM32: An introduction to ‘Bare Metal’-programming the Arm-Cortex-M4(R) MCUs (Lesson 9: PWM)

by Peter Baier (DK7IH) Abstract In this article we will discuss pulse width modulation (PWM), how the respective signals are produced and how we can use them to control motor, light bulbs, LEDs etc. PWM in short When current consuming devices like motors, light bulbs, LEDs etc. have to be controlled concerning their intensity you…

Read the full article

From AVR to STM32: An introduction to ‘Bare Metal’-programming the Arm-Cortex-M4(R) MCUs (Lesson 8: Rotary Encoder)

by Peter Baier (DK7IH) Abstract Today’s lesson will cover a topic that the software developer will encounter sooner or later: The need to decode the signals from a rotary encoder. We will discuss that and deliver a simple and easy-to-use solution for this problem. Theory A rotary encoder is a set of two mechanical or…

Read the full article

From AVR to STM32: An introduction to ‘Bare Metal’-programming the Arm-Cortex-M4(R) MCUs (Lesson 7: ADC (I))

by Peter Baier (DK7IH) Abstract This unit will cover the basic usage of the Analog-Digital-Converter (ADC) in the STM32F4 MCU. We will develop a simple procedure to read multiple ADC values from various input pins and have these data ready for further processing. ADC in STM32F4 in brief The Analog-Digital-Converter in the STM32F4 MCU uses…

Read the full article

From AVR to STM32: An introduction to ‘Bare Metal’-programming the Arm-Cortex-M4(R) MCUs (Lesson 6: SPI (I))

by Peter Baier (DK7IH) SPI (serial peripheral interface) is a communication interface between electronic devices like microcontrollers, displays, DDS generators and many other electronic circuits. It is widely used, thus the manufacturers of microcontrollers have implemented predefined SPI functions into their hardware. On the other hand, it is possible (and easy) to write these functions…

Read the full article

From AVR to STM32: An introduction to ‘Bare Metal’-programming the Arm-Cortex-M4(R) MCUs (Lesson 5: Timers and Interrupts)

by Peter Baier (DK7IH) Abstract This unit will cover the basic usage of timers and related interrupts, a crucial topic in the world of microcontrollers. Introduction The STM32/Arm Cortex(R)-M4 MCUs contain a large number of timers: Basic timers General-purpose timers Advanced-control timers There are up to 14 timers in an STM32-MCU that are fully independent…

Read the full article

From AVR to STM32: An introduction to ‘Bare Metal’-programming the Arm-Cortex-M4(R) MCUs (Lesson 2: Register usage and port configuration)

Abstract In this lesson we will talk about port configuration in the STM32F4 MCU. First a closer look to the registers will be taken and then we will cover first output port configuration. By the end of this lesson input port config and usage will be covered. Handling registers When reading and writing data in…

Read the full article

From AVR to STM32: An introduction to ‘Bare Metal’-programming the Arm-Cortex-M4(R) MCUs (Lesson 1: The Basics)

Abstract This online course will provide the interested hobbyist software developer with the basic understanding of the steps that must be taken when migrating from the more or less “easy going”-oriented AVR 8-bit-MCU family to the more sophisticated STM32-ARM-Cortex devices. It is also designed for those who are coming from other platforms like PIC-controllers for…

Read the full article