Share the DDS output waveform of MSP430 controlled by sine wave and square wave C language program[Copy link]
//*******************************************************// // Subroutine description// //***************************************************// //Function 1: ad9850_reset() // Reset ad9850, then enter parallel port write mode //Function 2: ad9850_reset_serial() // Reset ad9850, then enter serial port write mode //Function 3: ad9850_wr_parrel(unsigned char w0,double frequence) // Parallel port writes ad9850 data, w0 is the data of w0 in ad9850, frequence // is the written frequency //Function 4: ad9850_wr_serial(unsigned char w0,double frequence) // Serial port writes ad9850 data, w0 is the data of w0 in ad9850, frequence // is the written frequency //Bits to be defined: //ad9850_w_clk; //ad9850_fq_up ; //ad9850_rest ; //ad9850_bit_data ; //Example: //sbit ad9850_w_clk =P2^2; //sbit ad9850_fq_up =P2^1; //sbit ad9850_rest =P2^0; //sbit ad9850_bit_data =P1^7; //***************************************************// // Write data description// //***************************************************// // Write data example: // ad9850_reset() // wr_lcd02_data(unsigned char x) // ad9850_wr_parrel(0x01,1000) // ad9850_wr_serial(0x01,1000) //***************************************************// //---------------------------------------------------// // Program// //---------------------------------------------------// # include
# include