2024年5月15日发(作者:睢鸿振)
使用MSP430的DAC8552驱动程序,调试通过,不要感谢我!
#include
#include "DAC8552.h"
void Clock_Init();
int main( void )
{
// Stop watchdog timer to prevent time out reset
WDTCTL = WDTPW + WDTHOLD;
P1DIR = 0XFF;
P1OUT = 0X00;
P2DIR = 0XFF;
P2OUT = 0X00;
P3DIR = 0XFF;
P3OUT = 0X00;
P4DIR = 0XFF;
P4OUT = 0X00;
P5DIR = 0XFF;
P5OUT = 0X00;
P6DIR = 0XFF;
P6OUT = 0X00;
P7SEL = 0X80;
P7DIR = 0X80;
P1SEL = 0X01;
P1DIR = 0X01;
P2SEL = 0X04;
P2DIR = 0X04;
//P7.7 MCLK输出
//P1.0 ACLK输出
//P2.2 SMCLK输出
2024年5月15日发(作者:睢鸿振)
使用MSP430的DAC8552驱动程序,调试通过,不要感谢我!
#include
#include "DAC8552.h"
void Clock_Init();
int main( void )
{
// Stop watchdog timer to prevent time out reset
WDTCTL = WDTPW + WDTHOLD;
P1DIR = 0XFF;
P1OUT = 0X00;
P2DIR = 0XFF;
P2OUT = 0X00;
P3DIR = 0XFF;
P3OUT = 0X00;
P4DIR = 0XFF;
P4OUT = 0X00;
P5DIR = 0XFF;
P5OUT = 0X00;
P6DIR = 0XFF;
P6OUT = 0X00;
P7SEL = 0X80;
P7DIR = 0X80;
P1SEL = 0X01;
P1DIR = 0X01;
P2SEL = 0X04;
P2DIR = 0X04;
//P7.7 MCLK输出
//P1.0 ACLK输出
//P2.2 SMCLK输出