资源简介
Sillcon lab 8051 单片机 ADC PCA I2C UART SPI USB FLASH TIMER 等等 相关实例 代码

代码片段和文件信息
//-----------------------------------------------------------------------------
// F38x_ADC0_ExternalInput.c
//-----------------------------------------------------------------------------
// Copyright 2006 Silicon Laboratories Inc.
// http://www.silabs.com
//
// Program Description:
// --------------------
//
// This example code takes and averages 2048 analog measurements from input
// P1.1 using ADC0 then prints the results to a terminal window via the UART.
//
// The system is clocked by the internal 12MHz oscillator. Timer 2 triggers
// a conversion on ADC0 on each overflow. The completion of this conversion
// in turn triggers an interrupt service routine (ISR). The ISR averages
// 2048 measurements then prints the value to the terminal via printf before
// starting another average cycle.
//
// The analog multiplexer selects P1.1 as the positive ADC0 input. This
// port is configured as an analog input in the port initialization routine.
// The negative ADC0 input is connected via mux to ground which provides
// for a single-ended ADC input.
//
// A 100kohm potentiometer may be connected as a voltage divider between
// VREF and AGND on the terminal strip as shown below:
//
// ---------
// |
// |
// |
// o| VREF ----|
// o| GND ---|<-|
// o| |
// o| P1.1--------|
// |
//----------
// C8051F380-TB
//
// Terminal output is done via printf which directs the characters to
// UART0. A UART initialization routine is therefore necessary.
//
// ADC Settling Time Requirements Sampling Rate:
// ----------------------------------------------
//
// The total sample time per input is comprised of an input setting time
// (Tsettle) followed by a conversion time (Tconvert):
//
// Tsample = Tsettle + Tconvert
//
// |--------Settling-------|==Conversion==|----Settling--- . . .
// Timer 2 overflow ^
// ADC0 ISR ^
//
// The ADC input voltage must be allowed adequate time to settle before the
// conversion is made. This settling depends on the external source
// impedance internal mux impedance and internal capacitance.
// Settling time is given by:
//
// | 2^n |
// Tsettle = ln | --- | * Rtotal * Csample
// | SA |
//
// In this application assume a 100kohm potentiometer as the voltage divider.
// The expression evaluates to:
//
// | 2^10 |
// Tsettle = ln | ---- | * 105e3 * 5e-12 = 4.4uS
// | 0.25 |
//
// In addition one must allow at least 1.5uS after changing analog mux
// inputs or PGA settings. The settling time in this example then is
// dictated by the large external source resistance.
//
// The conversion is 10 periods of the SAR clock . At 3 MHz
// this time is 10 * 400nS = 3.3
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 13350 2011-02-14 16:52 C8051F38x\ADC\F38x_ADC0_ExternalInput.c
文件 19955 2017-07-12 09:26 C8051F38x\ADC\F38x_ADC0_ExternalInput_Mux.#1
文件 19953 2017-07-12 09:21 C8051F38x\ADC\F38x_ADC0_ExternalInput_Mux.#2
文件 19953 2017-07-12 09:06 C8051F38x\ADC\F38x_ADC0_ExternalInput_Mux.#3
文件 19952 2017-07-12 09:27 C8051F38x\ADC\F38x_ADC0_ExternalInput_Mux.c
文件 28923 2017-07-14 05:53 C8051F38x\ADC\F38x_ADC0_ExternalInput_Mux.LST
文件 22850 2017-07-14 05:53 C8051F38x\ADC\F38x_ADC0_ExternalInput_Mux.OBJ
文件 178 2017-07-14 05:53 C8051F38x\ADC\tmp.out
文件 18607 2011-02-14 16:54 C8051F38x\bl
文件 21513 2011-02-14 16:54 C8051F38x\bl
文件 23803 2011-02-14 16:54 C8051F38x\bl
文件 2719 2011-02-14 16:52 C8051F38x\bl
文件 5920 2011-02-14 16:52 C8051F38x\bl
文件 35536 2011-02-14 16:52 C8051F38x\bl
文件 35597 2011-02-14 16:52 C8051F38x\bl
文件 8426 2011-02-14 16:52 C8051F38x\Comparators\F38x_Comparator0_ResetSource.c
文件 18607 2011-02-14 16:54 C8051F38x\Header_Files\C8051F380.INC
文件 21513 2011-02-14 16:54 C8051F38x\Header_Files\C8051F380_defs.h
文件 23803 2011-02-14 16:54 C8051F38x\Header_Files\compiler_defs.h
文件 6993 2011-02-14 16:52 C8051F38x\Interrupts\F38x_External_Interrupts.c
文件 9002 2011-02-14 16:52 C8051F38x\Oscillators\F38x_Clock_Multiplier.c
文件 10346 2011-02-14 16:52 C8051F38x\Oscillators\F38x_LFO_Idle.c
文件 5713 2011-02-14 16:52 C8051F38x\Oscillators\F38x_Oscillator_Capacitor.c
文件 8695 2011-02-14 16:52 C8051F38x\Oscillators\F38x_Oscillator_CMOS.c
文件 5962 2011-02-14 16:52 C8051F38x\Oscillators\F38x_Oscillator_Crystal.c
文件 5809 2011-02-14 16:52 C8051F38x\Oscillators\F38x_Oscillator_RC.c
文件 10414 2011-02-14 16:52 C8051F38x\PCA\F38x_PCA0_16Bit_PWM_Output.c
文件 8312 2011-02-14 16:52 C8051F38x\PCA\F38x_PCA0_8Bit_PWM_Output.c
文件 11017 2011-02-14 16:52 C8051F38x\PCA\F38x_PCA0_Capture_Input.c
文件 6482 2011-02-14 16:52 C8051F38x\PCA\F38x_PCA0_Frequency_Output.c
............此处省略319个文件信息
- 上一篇:数控加工理论与编程技术
- 下一篇:区块链技术指南 0.9.0
相关资源
- 51单片机通信采样proteus仿真方波转化
- 基于MCS_51单片机的工业屏柜散热方案
- MCS_51单片机与8255A的接口设计
- 51单片机PWM程序,占空比、周期可调整
- 51单片机多功能自行车测速仪
- 00
- 用51单片机实现G代码翻译
- 简易的电阻电容测量电路
- 51单片机基于protues的几个仿真实例
- 51单片机PCB设计图
- PC -- 单片机的串口数据传输系统设计
- 51单片机控制舵机程序
- 51单片机读取温度数据存储到SD卡中并
- 【单片机】51单片机数码管显示万年历
- C51单片机汇编指令查询、学习工具集
- 基于8051单片机的红外接收程序
- 51单片机频率计(很简单)
- 基于51单片机的智能温控器
- 基于51单片机的16*16点阵动态显示
- 基于51单片机的模数转换与数模转换
- 51单片机中使用ucos ii的优缺点转
- 51单片机中使用ucos ii的优缺点
- 8051单片机教程第二十七课:单片机几
- 8051单片机教程第二十六课:矩阵式键
- 适用于STC单片机和51单片机的SX1262驱动
- 基于51单片机的计算器(C51编写,有
- 51单片机大量源码
- 基于51单片机的交通信号灯程序
- GSM监控系统51单片机设计
- 51单片机定时器/计数器的结构和原理
评论
共有 条评论