![]() Other important ADC characteristics for STM8S103P36 can be found in the below table taken from the datasheet. ![]() Do note that it will not be possible to use the same pin for all three purposes, so if we are using these two pins for ADC, then we will not be able to perform serial communication. On the STM8S103F3P6, we have an ADC with 5 Channel and 10-bit resolution with a 10-bit resolution, we will be able to measure the digital value from 0 to 1024 and a 5 channel ADC indicates that we have 5 pins on the Microcontroller which can support ADC, these 5 pins are highlighted in the picture below.Īs you can see, all these five pins (AIN2, AIN3, AIN4, AIN5, and AIN6) are multiplexed with other peripherals, meaning apart from just acting as an ADC pin, these pins can also be used for performing other communications like for example, the pin 2 and 3 (AIN5 and AIN 6) can not only be used for ADC but can also be used for serial communication and GPIO functions. There are many types of ADC and each microcontroller has its own specifications. ![]() To do this, we will need the following components. In this article, we will be reading two analog voltage values from two potentiometers and display its ADC value on a 16x2 LCD display. So in this article, let's learn how to use ADC on STM8S Microcontroller with COMIC C compiler. ![]() But our microcontrollers and microprocessors are digital devices and they will not be able to measure these parameters without an important peripheral called Analog to Digital Converters (ADC). ![]() An ADC is a very useful peripheral on a microcontroller that is often used by embedded programmers to measure units that are in constant change like the varying voltage, current, temperature, humidity, etc.Īs we know “We live in an analog world with digital devices”, meaning everything around us like wind speed, light intensity, temperature, and everything we deal with like speed, velocity, pressure, etc. Now, proceeding with it on this tutorial, we will learn how to use the ADC feature on our STM8S103F3P6 Microcontroller. If you are a regular reader who is following our STM8S Microcontroller Tutorials, you would know that in our last tutorial, we learned how to interface a 16x2 LCD with STM8s. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |