資源簡(jiǎn)介
C8051F35X單片機(jī)所有外設(shè)例程,最基本功能的實(shí)現(xiàn)。適當(dāng)?shù)母膭?dòng)就能使用。

代碼片段和文件信息
//-----------------------------------------------------------------------------
//?F35x_ADC0_Buffered.c
//-----------------------------------------------------------------------------
//?Copyright?2004?Silicon?Laboratories?Inc.
//
//?AUTH:?BD?/?PC?/?BW
//?LMOD:?BW?15?JUL?2004
//?DATE:?06?APR?2004
//
//?This?program?demonstrates?taking?measurements?using?the?24-bit?ADC?on?the
//?C8051F350/51?devices.
//
//?Input?pin?configuration?shown?in?ADC0_Init().
//
//?For?a?Noise?measurement?connect?AIN0?and?AIN1?to?AGND?at?the?terminal
//?block.??Set?“USE_FLOAT“?to?‘1‘?“PRINT_STATISTICS“?to?‘1‘
//?“PRINT_SAMPLES“?to?‘0‘?and?“PRINT_VOLTAGES“?to?‘0‘.
//
//?This?software?configures?the?ADC?to?use?an?external?VREF.??Therefore
//?on?the?‘F350?target?board?J13?and?J14?should?have?their?shorting?blocks
//?installed.
//
//?The?standard?deviation?(Sigma)?of?a?sample?set?is?equivalent?to?the
//?effective?RMS?noise?of?the?conversion?system.??“Sigma“?when?converted
//?to?Volts?is?equivalent?to?the?input-referred?noise?floor?of?the
//?sampling?system.
//
//?Typical?values?of?Sigma?from?the?C8051F350?rev?B?target?board?with
//?AIN0?and?AIN1?grounded?at?the?terminal?block?are?around?9?to?11?LSBs
//?in?bipolar?mode.??For?a?DC?measurement?this?is?equivalent?to?a?Signal-
//?to-Noise?ratio?of?about?117dB?or?about?20?bits?of?effective?dynamic
//?range.
//
//?117dB?=?20?log10?(?11?/?2^23)
//?20?bits?=?117dB?/?6dB/bit
//
//?Another?parameter?of?note?for?integrating?converters?is?the?number?of
//?Noise-Free?bits.??For?a?Gaussian-distributed?noise?floor?this?number
//?can?be?obtained?by?multiplying?Sigma?by?6?evaluating?the?number?of
//?bits?required?to?contain?the?result?and?subtracting?this?number?of
//?bits?from?the?24?available?bits?as?follows:
//
//?10?LSBs?*?6?=?60?LSBs?which?can?be?contained?in?6?bits.??Noise-free
//?resolution?is?24bits?-?6?bits?=?18?bits.
//
//?Refer?to?‘F350?datasheet?tables?“ADC0?Electrical?Characteristics“?and
//?“Absolute?Maximum?Ratings“?for?the?MIN/MAX?voltage?range?on?input?pins.
//
//?If?using?the?eval?version?of?the?Keil?compiler?set?“USE_FLOAT“?to?‘0‘
//?and?calculate?the?standard?deviation?by?taking?the?square?root
//?of?“variance“.
//
//?Target:?C8051F35x
//
//?Tool?chain:?KEIL?C51
//
//?v1.0?PC?26?MAY?2004
//?Initial?Revision?(Adapted?from?‘F350?Temp?Sensor?Demo)
//
//?set?USE_FLOAT?to?‘0‘?to?use?EVAL?version?of?Keil?compiler
#define?USE_FLOAT?1
#define?PRINT_STATISTICS?1
#define?PRINT_SAMPLES?0
#define?PRINT_VOLTAGES?0
//-----------------------------------------------------------------------------
//?Includes
//-----------------------------------------------------------------------------
#include?????????????????????//?SFR?declarations
#include?????????????????????????//?Standard?I/O?Library
#include?
//-----------------------------------------------------------------------------
//?16-bit?SFR?Definitions?for?‘F35x
/
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????18304??2016-11-15?14:11??C8051F35x\ADC\F35x_ADC0_Buffered.c
?????文件??????12595??2016-11-15?14:11??C8051F35x\ADC\F35x_ADC0_ExternalInput.c
?????文件??????10440??2016-11-15?14:11??C8051F35x\bl
?????文件??????10119??2016-11-15?14:11??C8051F35x\bl
?????文件??????17278??2016-11-15?14:11??C8051F35x\bl
?????文件??????23727??2016-11-15?14:11??C8051F35x\bl
?????文件???????2526??2016-11-15?14:11??C8051F35x\bl
?????文件???????5115??2016-11-15?14:11??C8051F35x\bl
?????文件??????38488??2016-11-15?14:11??C8051F35x\bl
?????文件??????32286??2016-11-15?14:11??C8051F35x\bl
?????文件???????8440??2016-11-15?14:11??C8051F35x\Comparators\F35x_Comparator0_ResetSource.c
?????文件??????12294??2016-11-15?14:11??C8051F35x\DAC\F35x_DACs_SineCosine.c
?????文件??????10440??2016-11-15?14:11??C8051F35x\Header_Files\c8051F350.h
?????文件??????10119??2016-11-15?14:11??C8051F35x\Header_Files\C8051F350.INC
?????文件??????17278??2016-11-15?14:11??C8051F35x\Header_Files\c8051F350_defs.h
?????文件??????23727??2016-11-15?14:11??C8051F35x\Header_Files\compiler_defs.h
?????文件???????6791??2016-11-15?14:11??C8051F35x\Interrupts\F35x_External_Interrupts.c
?????文件???????5657??2016-11-15?14:11??C8051F35x\Oscillators\F35x_Oscillator_Capacitor.c
?????文件???????8889??2016-11-15?14:11??C8051F35x\Oscillators\F35x_Oscillator_CMOS.c
?????文件???????5618??2016-11-15?14:11??C8051F35x\Oscillators\F35x_Oscillator_Crystal.c
?????文件???????5777??2016-11-15?14:11??C8051F35x\Oscillators\F35x_Oscillator_RC.c
?????文件??????10414??2016-11-15?14:11??C8051F35x\PCA\F35x_PCA0_16Bit_PWM_Output.c
?????文件???????8316??2016-11-15?14:11??C8051F35x\PCA\F35x_PCA0_8Bit_PWM_Output.c
?????文件??????11212??2016-11-15?14:11??C8051F35x\PCA\F35x_PCA0_Capture_Input.c
?????文件???????6478??2016-11-15?14:11??C8051F35x\PCA\F35x_PCA0_Frequency_Output.c
?????文件???????9626??2016-11-15?14:11??C8051F35x\PCA\F35x_PCA0_High_Speed_Output.c
?????文件??????10416??2016-11-15?14:11??C8051F35x\PCA\F35x_PCA0_Software_Timer_bl
?????文件???????5721??2016-11-15?14:11??C8051F35x\PortIO\F35x_Ports_SwitchLEDs.c
?????文件??????29719??2016-11-15?14:11??C8051F35x\SMBus\F35x_SMBus_EEPROM.c
?????文件??????20871??2016-11-15?14:11??C8051F35x\SMBus\F35x_SMBus_Master.c
............此處省略35個(gè)文件信息
評(píng)論
共有 條評(píng)論