MSP430F5529有没有库函数的开发手册或者指南的?只能找到寄存器但是看不懂库函数,现在有一套程序是库函数的需要看懂555,ADC12部分的
代码如下:
#include "driverlib.h"
#define Num_of_Results 8
volatile uint16_t results[Num_of_Results];
void main (void)
{
WDT_A_hold(WDT_A_BASE); //关闭看门狗
GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P6, //使能输入端口p6.0
GPIO_PIN0
);
//Initialize the ADC12_A Module
/*
* Base address of ADC12_A Module
* Use internal ADC12_A bit as sample/hold signal to start conversion
* USE MODOSC 5MHZ Digital Oscillator as clock source
* Use default clock divider of 1
*/从下面开始就有点懵了,有些知道是干什么的但是不知道具体是怎么执行的
ADC12_A_init(ADC12_A_BASE,
ADC12_A_SAMPLEHOLDSOURCE_SC,
ADC12_A_CLOCKSOURCE_ADC12OSC,
ADC12_A_CLOCKDIVIDER_1);
ADC12_A_enable(ADC12_A_BASE);
/*
* Base address of ADC12_A Module
* For memory buffers 0-7 sample/hold for 256 clock cycles
* For memory buffers 8-15 sample/hold for 4 clock cycles (default)
* Enable Multiple Sampling
*/
ADC12_A_setupSamplingTimer(ADC12_A_BASE,
ADC12_A_CYCLEHOLD_256_CYCLES,
ADC12_A_CYCLEHOLD_4_CYCLES,
ADC12_A_MULTIPLESAMPLESENABLE);
//Configure Memory Buffer
/*
* Base address of the ADC12_A Module
* Configure memory buffer 0
* Map input A0 to memory buffer 0
* Vref+ = AVcc
* Vref- = AVss
* Memory buffer 0 is not the end of a sequence
*/
ADC12_A_configureMemoryParam param = {0};
|