[an error occurred while processing this directive]
|
//
// ** Out9833 -- the function to send data to the AD9833 device
//
void Out9833(unsigned data)
{
char _cnt = 16; // Bit counterDDS_PORT &= ~DDS_MSK; // Be sure all signals are low initially
DDS_EN_PORT |= EN_BIT; // DDS access enabledo { // Transmit all 16 bits
if (data & (1<<15)) // Set the data bit
DDS_PORT &= ~SDATA_BIT; //
else //
DDS_PORT |= SDATA_BIT; //
DDS_PORT |= SCLK_BIT; // Form clock pulse
data <<= 1; // Prepare to send next bit
DDS_PORT &= ~SCLK_BIT; //
} //
while (--_cnt); //DDS_EN_PORT &= ~EN_BIT; // DDS access disable
}
E-mail: info@telesys.ru