AN123 Silicon_Laboratories, AN123 Datasheet - Page 15

no-image

AN123

Manufacturer Part Number
AN123
Description
Using THE DAC AS A Function Generator
Manufacturer
Silicon_Laboratories
Datasheet
}
}
// Adjust the Gain
temporary_long.Long = (long) ((long)temp1 * (long)amplitude);
temp1 = temporary_long.Int[0];
// Add a DC bias to make the rails 0 to 65535
// Note: the XOR with 0x8000 translates the bipolar quantity into
// a unipolar quantity.
DAC1 = 0x8000 ^ temp1;
default:
temp1 = -32768;
break;
while(1);
// same as temporary_long >> 16
Rev. 1.1
AN123
15

Related parts for AN123