⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 f280xadc04b.h

📁 DSP280X芯片的编程简单例子
💻 H
字号:
/* ==================================================================================
File name:       F280XADC04B.H
                    
Originator:	Digital Control Systems Group
			Texas Instruments

Description: This header file contains source for the F280X general purpose 
4 conversions ADC driver for bipolar signals

Target: TMS320F280x family
              
=====================================================================================
History:
-------------------------------------------------------------------------------------
 04-15-2005	Version 3.20: Using DSP280x v. 1.10 or higher 
------------------------------------------------------------------------------------*/

#ifndef __F280XADC04B_H__
#define __F280XADC04B_H__

#include "f280xbmsk.h"

/*-----------------------------------------------------------------------------
Define the structure of the ADCVALSB Object
-----------------------------------------------------------------------------*/
typedef struct { int16 Ch1Gain;         // Parameter: Gain for channel 1 (Q13) 
                 int16 Ch1Offset;       // Parameter: Offset for channel 1 (Q15) 
                 int16 Ch1Out;          // Output: Channel 1 output (Q15) 
                 int16 Ch2Gain;         // Parameter: Gain for channel 2 (Q13) 
                 int16 Ch2Offset;       // Parameter: Offset for channel 2 (Q15) 
                 int16 Ch2Out;          // Output: Channel 2 output (Q15) 
                 int16 Ch3Gain;         // Parameter: Gain for channel 3 (Q13) 
                 int16 Ch3Offset;       // Parameter: Offset for channel 3 (Q15) 
                 int16 Ch3Out;          // Output: Channel 3 output (Q15) 
                 int16 Ch4Gain;         // Parameter: Gain for channel 4 (Q13) 
                 int16 Ch4Offset;       // Parameter: Offset for channel 4 (Q15) 
                 int16 Ch4Out;          // Output: Channel 4 output (Q15) 
                 Uint16 ChSelect;       // Parameter: ADC channel selection 
                 void (*init)();        // Pointer to the init function 
                 void (*read)();        // Pointer to the read function 
               } ADCVALSB;

typedef ADCVALSB *ADCVALSB_handle;
/*-----------------------------------------------------------------------------
 Note 1 : It is necessary to call the init function to change the ADC 
            register settings, for the change in the channel setting for 
            Ch_sel setting changes to take effect.
            The read function will not detect or act upon this change.
-----------------------------------------------------------------------------*/
// Default Initializer for the ADCVALSB Object

#define F280X_ADC04B_DEFAULTS { 0x1FFF,0x0000,0x0000,             \
                                0x1FFF,0x0000,0x0000,             \
                                0x1FFF,0x0000,0x0000,             \
                                0x1FFF,0x0000,0x0000,             \
                                0x9810,                    \
                              (void (*)(Uint32))F280X_adc04b_drv_init, \
                              (void (*)(Uint32))F280X_adc04b_drv_read  \
                             }

#define ADCVALSB_DEFAULTS F280X_ADC04B_DEFAULTS 

#define ADCTRL1_INIT_STATE_BIPOLAR  ADC_SUS_MODE0 + ADC_ACQ_PS_16 + \
                                    ADC_CPS_2 + ADC_SEQ_CASC

#define ADCTRL2_INIT_STATE_BIPOLAR  ADC_EPWM_SOCA_SEQ1 

/*------------------------------------------------------------------------------
 Prototypes for the functions in F280XADC04B.C
------------------------------------------------------------------------------*/
void F280X_adc04b_drv_init(ADCVALSB *);
void F280X_adc04b_drv_read(ADCVALSB *);

#endif // __F280XADC04B_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -