基于MSP430的参考程序,谢谢
Vio Liu:
楼主是哪里遇到问题了呢?
ADS8326的程序,供参考:
unsigned short Get8326Voltage(){ unsigned short temp=0; unsigned char i; CLK_1; CS_0; CLK_0; CLK_1; CLK_0; CLK_1; CLK_0; CLK_1; CLK_0; CLK_1; CLK_0; CLK_1; for(i=0;i<16;i++) { temp<<=1; CLK_0; CLK_1; if(GET_DO) temp+=1; } CS_1; return temp;}
unsigned short SPIGet8326Voltage(){ unsigned short temp=0; unsigned short i; CS_1; CS_0; for(i=0;i<16;i++) { temp<<=1; CLK_0; CLK_1; temp+=GET_DO; } CS_1; return temp;}