EasyManua.ls Logo

STMicroelectronics STM8 - Timer Interrupt (TIM4)

STMicroelectronics STM8
126 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Timer Interrupt (TIM4)
In this example uses the same concepts of the previous example but it is based on timer interrupt
TIM4 interrupt. Timer interrupts are very important interrupts apart from other interrupts in a micro.
To me they are highly valuable and useful.
This example demonstrates how to scan and project information on multiple seven segment displays
with timer interrupt while the main loop can process the information to be displayed.
Hardware Connection
Code Example
main.c
#include "STM8S.h"
unsigned int value = 0x00;
unsigned char n = 0x00;
unsigned char seg = 0x01;
const unsigned char num[0x0A] = {0xC0, 0xF9, 0xA4, 0xB0, 0x99, 0x92, 0x82, 0xF8, 0x80, 0x90};

Related product manuals