资 源 简 介
include "macrodefine.h"#include "lpc2294.h"
//ADS1210初始化子程序void AD_Init(void){ Delayus(2); SPI1_Communation(0x64); SPI1_Communation(0x72); //单极性,SDOUT独立,先MSB,REF使用内部 SPI1_Communation(0x20); //自校准模式,增益1,通道0 SPI1_Communation(0x87); //TURBO=16, SPI1_Communation(0xa0); //数据更新率100}//读取ADS1210转换结果子程序uint32 Read_AD_Data(void){ uint8 i=0; uint8 Data_Temp[3]; uint32 Result_HEX=0; Delayus(1); SPI1_Communation(0xc0); for(i=0;i<3;i++) { Data_Temp[i] =SPI1_Communation(0xff); }