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 #60 background imageLoading...
Page #60 background image
In the main function, we are simply polling AWD flag. If an AWD (beyond boundary zone) event on
PB1 pin occurs the LED on PD0 starts flashing. If PB1 senses voltage between 200 and 600 ADC counts,
the LED is turned off, indicating guarded zone.
if(ADC1_GetFlagStatus(ADC1_FLAG_AWD))
{
GPIO_WriteReverse(GPIOD, GPIO_PIN_0);
ADC1_ClearFlag(ADC1_FLAG_AWD);
}
else
{
GPIO_WriteHigh(GPIOD, GPIO_PIN_0);
}

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