21ic网友针对教程的学习讨论异常热烈,现将部分精彩问答及分享内容整理呈现:
第五章 24-BitΣ-Δ模数转换器 5.1 本章引言
- 二阶Σ-Δ架构
- 高达7个(这个数量跟库函数手册有出入啊)可同时采样的ADC。(具体数量请参考对应型号手册)。
- 固定的1.024 MHz调制器输入频率。
- 软件可选择的内置和外置参考电压
- 软件可选的全通道温度传感器
1
|
void SD24_init ( uint16_t baseAddress, uint8_t referenceSelect )
|
初始化SD24模块
|
|
2
|
void SD24_initConverter (uint16_t baseAddress, uint16_t converter, uint16_t conversionMode)
|
配置SD24转换器
|
|
3
|
void SD24_initConverterAdvanced (uint16_t baseAddress, SD24_initConverterAdvancedParam ∗param)
|
配置SD24转换器—高级配置
|
|
4
|
void SD24_setConverterDataFormat (uint16_ baseAddress, uint16_t converter, uint16_t dataFormat)
|
设置SD24转换器数据格式
|
|
5
|
void SD24_startConverterConversion (uint16_t baseAddress, uint8_t converter)
|
转换器开始转换
|
|
6
|
void SD24_stopConverterConversion (uint16_t baseAddress, uint8_t converter)
|
停止转换器转换
|
|
7
|
void SD24_setInputChannel (uint16_t baseAddress, uint8_t converter, uint8_t inputChannel)
|
配置输入通道
|
|
8
|
void SD24_setInterruptDelay (uint16_t baseAddress, uint8_t converter, uint8_t interruptDelay)
|
为中断触发配置延迟
|
|
9
|
void SD24_setOversampling (uint16_t baseAddress, uint8_t converter, uint16_t oversampleRatio)
|
对转换器配置过采样率
|
|
10
|
void SD24_setGain (uint16_t baseAddress, uint8_t converter, uint8_t gain)
|
为转换器配置增益
|
|
11
|
uint32_t SD24_getResults (uint16_t baseAddress, uint8_t converter)
|
返回所选转换器的转换结果
|
|
12
|
uint16_t SD24_getHighWordResults (uint16_t baseAddress, uint8_t converter)
|
返回转换结果的高字位
|
|
13
|
void SD24_enableInterrupt (uint16_t baseAddress, uint8_t converter, uint16_t mask)
|
使能SD24模块中断。
|
|
14
|
void SD24_disableInterrupt (uint16_t baseAddress, uint8_t converter, uint16_t mask)
|
关闭SD24模块中断
|
|
15
|
void SD24_clearInterrupt (uint16_t baseAddress, uint8_t converter, uint16_t mask)
|
清除SD24模块中断(清除中断标志)。
|
|
16
|
uint16_t SD24_getInterruptStatus (uint16_t baseAddress, uint8_t converter, uint16_t mask)
|
返回SD24模块的中断标志
|
SD24_initConverter()
SD24_initConverterAdvanced()
SD24_startConverterConversion()
SD24_stopConverterConversion()
SD24_getResults()
SD24_getHighWordResults()
SD24 enableInterrupt()
SD24 disableInterrupt()
SD24 clearInterrupt()
SD24 getInterruptStatus()
SD24 setInputChannel()
SD24 setConverterDataFormat()
SD24 setInterruptDelay()
SD24 setOversampling()