Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
DSP281x_Adc.c
Package: TMS320F2812-EVM.rar [view]
Upload User: qingfan3
Upload Date: 2014-10-27
Package Size: 31439k
Code Size: 2k
Category:
DSP program
Development Platform:
C/C++
- //###########################################################################
- //
- // FILE: DSP281x_Adc.c
- //
- // TITLE: DSP281x ADC Initialization & Support Functions.
- //
- //###########################################################################
- //
- // Ver | dd mmm yyyy | Who | Description of changes
- // =====|=============|======|===============================================
- // 1.00| 11 Sep 2003 | L.H. | Changes since previous version (v.58 Alpha)
- // | | | ADC_usDELAY changed from 5000L to 8000L
- //###########################################################################
- #include "DSP281x_Device.h" // DSP281x Headerfile Include File
- #include "DSP281x_Examples.h" // DSP281x Examples Include File
- #define ADC_usDELAY 8000L
- #define ADC_usDELAY2 20L
- //---------------------------------------------------------------------------
- // InitAdc:
- //---------------------------------------------------------------------------
- // This function initializes ADC to a known state.
- //
- void InitAdc(void)
- {
- extern void DSP28x_usDelay(Uint32 Count);
- // To powerup the ADC the ADCENCLK bit should be set first to enable
- // clocks, followed by powering up the bandgap and reference circuitry.
- // After a 5ms delay the rest of the ADC can be powered up. After ADC
- // powerup, another 20us delay is required before performing the first
- // ADC conversion. Please note that for the delay function below to
- // operate correctly the CPU_CLOCK_SPEED define statement in the
- // DSP28_Examples.h file must contain the correct CPU clock period in
- // nanoseconds. For example:
- AdcRegs.ADCTRL3.bit.ADCBGRFDN = 0x3; // Power up bandgap/reference circuitry
- DELAY_US(ADC_usDELAY); // Delay before powering up rest of ADC
- AdcRegs.ADCTRL3.bit.ADCPWDN = 1; // Power up rest of ADC
- DELAY_US(ADC_usDELAY2); // Delay after powering up ADC
- }
- //===========================================================================
- // No more.
- //===========================================================================