STM32F334C8T6这款MCU中有两个12位ADC(模数转换器),ADC1的通道16连接到内置的一个温度传感器,本文使用该温度传感器测量MCU和周围的环境温度,并且通过串口发送到PC的串口助手进行显示。
1. ADC的使用
2. Enable the ADC interface clock using RCC_AHBPeriphClockCmd();
3. ADC pins configuration
Enable the clock for the ADC GPIOs using the following function: RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOx, ENABLE);
Configure these ADC pins in analog mode using GPIO_Init();
4. Configure the ADC conversion resolution, data alignment, external trigger and edge,
5. Activate the ADC peripheral using ADC_Cmd() function.
486



被折叠的 条评论
为什么被折叠?



