STM32 Nucleo Timer Encoder Mode with Rotary Encoder Example

STM32 Nucleo Timer Encoder Mode with Rotary Encoder Example

In this Nucleo tutorial, we will discuss how to configure STM32 timer module in encoder mode. We will use a rotary encoder to demonstrate that how to read the encoder ticks using STM32Cube IDE and HAL libraries. In the first example, we will display encoder ticks on a serial terminal, and in the second example, … Read more

STM32 Nucleo Generate PWM with Timers using STM32CubeIDE

STM32 Nucleo Timer in PWM Mode with LED Dimmer Example

In this tutorial, we will learn to use STM32 Nucleo timer in PWM mode to generate PWM signals and how to configure them to generate signals with different duty cycle and frequency. We will use an LED dimmer example to demonstrate how to setup the timer in PWM mode using STM32Cube IDE and HAL libraries … Read more

STM32 Nucleo Timer Input Capture Mode with Frequency Measurement Example

STM32 Nucleo Timer Input Capture Mode with Frequency Measurement Example

In this STM32 Nucleo user guide, we will discuss how to configure timer module in input capture mode to measure the frequency of an input signal. We will program our STM32 Nucleo in STM32 Cube IDE and build a frequency counter whereby one input capture channel will be enabled to capture an external signal on … Read more

TM4C123 Timer as a Counter in Input-Edge Count Mode – RPM Measurement Example

Tachometer using TM4C123 Timer as a counter in input capture mode

In this tutorial, we will design an RPM or tachometer using TM4C123 timers as a counter. To use the TM4C123 timer as a counter, we will configure it in input-edge counter mode. In input edge capture counter mode, timers of TM4C123 microcontroller start to count whenever an external event occurs on the input-edge capture GPIO … Read more

Frequency Measurement using TM4C123 Timers in Input-Edge Capture Mode

pulse duration and pulse width measurement using TM4C123 Timer in input edge capture mode

Almost all modern microcontrollers come with programmable general purpose timer modules. One of the important applications of GPTM is frequency measurement of analog and digital signals. In this tutorial, we will learn to measure the frequency using TM4C123 Timers in input edge time capture mode. In the last tutorial, we have learned to measure pulse … Read more

Timer Interrupt TM4C123 – Generate Delay with GPTM Interrupt Service Routine

Timer Interrupt TM4C123 Tiva C microcontroller

In this tutorial, we will discuss TM4C123 Timer interrupt programming ARM Cortex M4 microcontrollers. Firstly, we will discuss applications of timer interrupt with one example. We will use a TM4C123 Tiva C launchpad for demonstration purposes. It comes with a TM4C123GH6PM microcontroller. The general purpose timer module TimerA module will be configured and initialized to … Read more

STM32 Blue Pill Timer Encoder Mode with Rotary Encoder Example

STM32 Blue Pill Timer Encoder Mode with Rotary Encoder Example

In this Blue Pill tutorial, we will discuss how to configure STM32 timer module in encoder mode. We will use a rotary encoder to demonstrate that how to read the encoder ticks using STM32Cube IDE and HAL libraries. In the first example, we will display encoder ticks on a serial terminal, and in the second … Read more

Arduino Timer Interrupts – Explained with Timer1 and Timer2 Examples

Arduino UNO LED blink time interrupts

Interrupts are used to handle events that do not happen during the sequential execution of a program. There are two types of interrupts for the Arduino microcontroller. Hardware or external interrupt and Timer interrupt. In a previous tutorial, we looked at Arduino external interrupt where the interrupt was caused by is caused by the external … Read more

8051 Microcontroller Timers: How to Generate Delay Example

8051 timers calculations

In this tutorial, we will learn how to use timers on the 8051 microcontroller to generate a delay. The 8051 microcontroller has two 16-bit built-in timers. We can program each timer individually and configure them as either timers (to generate time delays) or counters (to count events occurring outside the microcontroller). The 8051 timer has … Read more