-
大小: 1.47MB文件类型: .rar金币: 1下载: 0 次发布日期: 2023-10-25
- 语言: 其他
- 标签: STM8S105C6 STM8S005C6
资源简介
STM8S105C6 ADC三通道采样实例-调试可用,在STM38S105C6与STM8S005C6的平台下调试都通过。用了ADC1的通道1、通道2、通道3
代码片段和文件信息
/**
******************************************************************************
* @file stm8s_adc1.c
* @author MCD Application Team
* @version V2.1.0
* @date 18-November-2011
* @brief This file contains all the functions/macros for the ADC1 peripheral.
******************************************************************************
* @attention
*
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* © COPYRIGHT 2011 STMicroelectronics
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include “stm8s_adc1.h“
/** @addtogroup STM8S_StdPeriph_Driver
* @{
*/
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
/* Public functions ----------------------------------------------------------*/
/**
* @addtogroup ADC1_Public_Functions
* @{
*/
/**
* @brief Deinitializes the ADC1 peripheral registers to their default reset
* values.
* @param None
* @retval None
*/
void ADC1_DeInit(void)
{
ADC1->CSR = ADC1_CSR_RESET_VALUE;
ADC1->CR1 = ADC1_CR1_RESET_VALUE;
ADC1->CR2 = ADC1_CR2_RESET_VALUE;
ADC1->CR3 = ADC1_CR3_RESET_VALUE;
ADC1->TDRH = ADC1_TDRH_RESET_VALUE;
ADC1->TDRL = ADC1_TDRL_RESET_VALUE;
ADC1->HTRH = ADC1_HTRH_RESET_VALUE;
ADC1->HTRL = ADC1_HTRL_RESET_VALUE;
ADC1->LTRH = ADC1_LTRH_RESET_VALUE;
ADC1->LTRL = ADC1_LTRL_RESET_VALUE;
ADC1->AWCRH = ADC1_AWCRH_RESET_VALUE;
ADC1->AWCRL = ADC1_AWCRL_RESET_VALUE;
}
/**
* @brief Initializes the ADC1 peripheral according to the specified parameters
* @param ADC1_ConversionMode: specifies the conversion mode
* can be one of the values of @ref ADC1_ConvMode_TypeDef.
* @param ADC1_Channel: specifies the channel to convert
* can be one of the values of @ref ADC1_Channel_TypeDef.
* @param ADC1_PrescalerSelection: specifies the ADC1 prescaler
* can be one of the values of @ref ADC1_PresSel_TypeDef.
* @param ADC1_ExtTrigger: specifies th
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 10982 2014-09-05 21:04 STM8S105 AD3通道采样实例\Project\Backup (2) of Project.ewd
文件 43114 2014-12-09 22:20 STM8S105 AD3通道采样实例\Project\Backup (2) of Project.ewp
文件 10982 2014-09-05 21:04 STM8S105 AD3通道采样实例\Project\Backup of Project.ewd
文件 43114 2014-12-09 22:20 STM8S105 AD3通道采样实例\Project\Backup of Project.ewp
文件 10323 2015-03-21 11:44 STM8S105 AD3通道采样实例\Project\Debug\Exe\project.hex
文件 91896 2015-03-21 11:44 STM8S105 AD3通道采样实例\Project\Debug\Exe\Project.out
文件 17929 2015-03-21 11:44 STM8S105 AD3通道采样实例\Project\Debug\Obj\adc.o
文件 255949 2018-06-05 12:29 STM8S105 AD3通道采样实例\Project\Debug\Obj\adc.pbi
文件 11676 2018-06-05 12:29 STM8S105 AD3通道采样实例\Project\Debug\Obj\adc.pbi.cout
文件 7632 2014-12-09 22:49 STM8S105 AD3通道采样实例\Project\Debug\Obj\key.o
文件 253572 2018-06-05 12:29 STM8S105 AD3通道采样实例\Project\Debug\Obj\key.pbi
文件 11676 2018-06-05 12:29 STM8S105 AD3通道采样实例\Project\Debug\Obj\key.pbi.cout
文件 14409 2014-12-09 23:06 STM8S105 AD3通道采样实例\Project\Debug\Obj\led.o
文件 258443 2018-06-05 12:29 STM8S105 AD3通道采样实例\Project\Debug\Obj\led.pbi
文件 11676 2018-06-05 12:29 STM8S105 AD3通道采样实例\Project\Debug\Obj\led.pbi.cout
文件 10156 2014-12-09 23:08 STM8S105 AD3通道采样实例\Project\Debug\Obj\main.o
文件 256220 2018-06-05 12:30 STM8S105 AD3通道采样实例\Project\Debug\Obj\main.pbi
文件 11677 2018-06-05 12:30 STM8S105 AD3通道采样实例\Project\Debug\Obj\main.pbi.cout
文件 479211 2018-06-05 12:30 STM8S105 AD3通道采样实例\Project\Debug\Obj\Project.pbd
文件 479211 2018-06-05 12:30 STM8S105 AD3通道采样实例\Project\Debug\Obj\Project.pbd.browse
文件 1837 2014-12-06 00:33 STM8S105 AD3通道采样实例\Project\Debug\Obj\Readme.o
文件 38 2018-06-02 11:18 STM8S105 AD3通道采样实例\Project\Debug\Obj\Readme.pbi
文件 11599 2018-06-02 11:18 STM8S105 AD3通道采样实例\Project\Debug\Obj\Readme.pbi.cout
文件 44409 2014-12-05 16:41 STM8S105 AD3通道采样实例\Project\Debug\Obj\stm8s_adc1.o
文件 269551 2018-06-02 11:18 STM8S105 AD3通道采样实例\Project\Debug\Obj\stm8s_adc1.pbi
文件 11608 2018-06-02 11:18 STM8S105 AD3通道采样实例\Project\Debug\Obj\stm8s_adc1.pbi.cout
文件 46882 2014-11-14 10:40 STM8S105 AD3通道采样实例\Project\Debug\Obj\stm8s_clk.o
文件 268278 2018-06-02 11:18 STM8S105 AD3通道采样实例\Project\Debug\Obj\stm8s_clk.pbi
文件 11607 2018-06-02 11:18 STM8S105 AD3通道采样实例\Project\Debug\Obj\stm8s_clk.pbi.cout
文件 39515 2014-11-14 10:40 STM8S105 AD3通道采样实例\Project\Debug\Obj\stm8s_flash.o
............此处省略110个文件信息
- 上一篇:基于web的ssh在线音乐系统
- 下一篇:Labview经典程序算法
评论
共有 条评论