EasyManuals Logo

STMicroelectronics STM8 User Manual

STMicroelectronics STM8
126 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #73 background imageLoading...
Page #73 background image
Hardware Connection
Code Example
In this example, Disco board’s user LED is turned-on and off without using any software delay. TIM2 is
used to create time delay as such that the code is not stuck in a time-wasting loop.
#include "STM8S.h"
void clock_setup(void);
void GPIO_setup(void);
void TIM2_setup(void);
void main(void)
{
clock_setup();
GPIO_setup();
TIM2_setup();
while(TRUE)
{
if(TIM2_GetCounter() > 976)

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the STMicroelectronics STM8 and is the answer not in the manual?

STMicroelectronics STM8 Specifications

General IconGeneral
BrandSTMicroelectronics
ModelSTM8
CategoryMicrocontrollers
LanguageEnglish

Related product manuals