32. STM32CubeIDE RGB LED. Multi channel ADC with STM32F103C8T6

  Рет қаралды 8,083

MicroPeta by Nizar Mohideen

MicroPeta by Nizar Mohideen

3 жыл бұрын

STM32 Blue Pill for intermediate
Code and diagram are at www.micropeta.com/video32

Пікірлер: 15
@gabrielpimentelgomes3195
@gabrielpimentelgomes3195 8 ай бұрын
It was very nice of you putting all the wires with the matching colors!
@rolandvanhall8622
@rolandvanhall8622 6 ай бұрын
Your Video's are quite helpfull and thank you for that. I miss the explenation on how to select the ADC channel. It seems this is done via a structure. The structure can be displayed by selecting the "ADC_ChannelConfTypeDef" parameter and press F2. The structure than will be displayed. By setting the structures value ".Channel" a specific ADC is selected.
@maulanawahyudi7127
@maulanawahyudi7127 Жыл бұрын
Sir, why we need Timer to use multi ADC ?or that will be output for LED? and why must timer 2 ?
@Alex556688
@Alex556688 2 жыл бұрын
Спасибо !
@NizarMohideen
@NizarMohideen 2 жыл бұрын
Добро пожаловать
@davidkelemen3305
@davidkelemen3305 Жыл бұрын
Hello, I have a potentiometer and a temperature sensor. For some reason, when I turn the potentiometer all the way up, it reads 4095 (12 bit resolution) correctly, but also the ADC from the temperature sensor goes up to 4095. Also it doesn't seem to read values less than 2000, even if the potentiometer is turned all the way down.
@rolandvanhall8622
@rolandvanhall8622 6 ай бұрын
You need to address the specific IO Pin before an analog to digital conversion. This is done via parameter "sConfigPrivateChannel". A two pin conversion would be something like this: sConfigPrivate.Rank = ADC_REGULAR_RANK_1; sConfigPrivate.SamplingTime = ADC_SAMPLETIME_1CYCLE_5; sConfigPrivate.Channel = ADC_CHANNEL_0; HAL_ADC_ConfigChannel(&hadc1, &sConfigPrivate); HAL_ADC_Start(&hadc1); HAL_ADC_PollForConversion(&hadc1,1000); ADC_Result_I16 = HAL_ADC_GetValue(&hadc1); HAL_ADC_Stop(&hadc1); sConfigPrivate.Channel = ADC_CHANNEL_1; HAL_ADC_ConfigChannel(&hadc1, &sConfigPrivate); HAL_ADC_Start(&hadc1); HAL_ADC_PollForConversion(&hadc1,1000); ADC_Result_I16 = HAL_ADC_GetValue(&hadc1); HAL_ADC_Stop(&hadc1);
@sagarbhoyar6176
@sagarbhoyar6176 2 жыл бұрын
Hi, Can you explain why did you use specific timer values
@NizarMohideen
@NizarMohideen 2 жыл бұрын
I set Prescaler to 127 and Counter Period to 625 because I wanted to have 100Hz PWM for LED’s. How I found 127 and 625 is as follows. Clock frequency is 8MHz (8000000Hz) I divided by 128 and then divided again by 625 8000000 / 128 = 62500 62500 / 625 = 100 Hz Prescaler is always 1 less. So it is 128-1 = 127
@sagarbhoyar6176
@sagarbhoyar6176 2 жыл бұрын
Thanks
@rosymelody4125
@rosymelody4125 2 жыл бұрын
hello sir, i have stm32 and i want to use rgb led to indicate the different body temperature value, so can i work with only one potentiometer and by using only one channel. what code should i need to use
@NizarMohideen
@NizarMohideen 2 жыл бұрын
Hi Rosy Melody, Have a look at kzfaq.info/get/bejne/hdxxksplyuCRqqc.html Instead of internal sensor, use one potentiometer Instead of three LEDs, use one RGB LED Cheers
@NizarMohideen
@NizarMohideen 2 жыл бұрын
You can use one ADC only and use the code given at nizarmohideen.herokuapp.com/video33 Change 1740 and 1720 to some values which suits you if (readValue > 1740) { HAL_GPIO_WritePin(GPIOA, GPIO_PIN_7, 1); HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4, 0); HAL_GPIO_WritePin(GPIOA, GPIO_PIN_1, 0); } else if (readValue > 1720 ) { HAL_GPIO_WritePin(GPIOA, GPIO_PIN_7, 0); HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4, 1); HAL_GPIO_WritePin(GPIOA, GPIO_PIN_1, 0); } else { HAL_GPIO_WritePin(GPIOA, GPIO_PIN_7, 0); HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4, 0); HAL_GPIO_WritePin(GPIOA, GPIO_PIN_1, 1); }
#5. STM32F4 ADC using Registers || Multi Channel Polling
18:11
ControllersTech
Рет қаралды 17 М.
29. STM32CubeIDE SD CARD. SPI with STM32F103C8T6
14:45
MicroPeta by Nizar Mohideen
Рет қаралды 22 М.
Now THIS is entertainment! 🤣
00:59
America's Got Talent
Рет қаралды 38 МЛН
Slow motion boy #shorts by Tsuriki Show
00:14
Tsuriki Show
Рет қаралды 7 МЛН
Looks realistic #tiktok
00:22
Анастасия Тарасова
Рет қаралды 104 МЛН
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
МЯТНАЯ ФАНТА
Рет қаралды 1,1 МЛН
34. STM32CubeIDE Button debounce. Interrupt with STM32F103C8T6
7:15
MicroPeta by Nizar Mohideen
Рет қаралды 20 М.
Set up multiple ADCs on STM32 microcontrollers using DMA
8:43
Random Rick
Рет қаралды 36 М.
6 Horribly Common PCB Design Mistakes
10:40
Predictable Designs
Рет қаралды 181 М.
33. STM32CubeIDE internal temperature sensor with STM32F103C8T6
7:33
MicroPeta by Nizar Mohideen
Рет қаралды 12 М.
Joystick module with STM32 || ADC || Multi Channel || HAL
8:36
ControllersTech
Рет қаралды 23 М.
46. STM32CubeIDE Internal RTC. Alarm with STM32F103C8T6
10:28
MicroPeta by Nizar Mohideen
Рет қаралды 14 М.
11. Install STM32 CubeIDE and LED blink program for Windows (OpenOCD included)
17:56
MicroPeta by Nizar Mohideen
Рет қаралды 65 М.
Now THIS is entertainment! 🤣
00:59
America's Got Talent
Рет қаралды 38 МЛН