AN123 Silicon_Laboratories, AN123 Datasheet - Page 12

no-image

AN123

Manufacturer Part Number
AN123
Description
Using THE DAC AS A Function Generator
Manufacturer
Silicon_Laboratories
Datasheet
AN123
//-----------------------------------------------------------------------------
// Sine
//-----------------------------------------------------------------------------
//
// Sets output to a sine wave.
//
void Sine (void)
{
}
//-----------------------------------------------------------------------------
// Square
//-----------------------------------------------------------------------------
//
// Sets output to a square wave.
//
void Square (void)
{
}
//-----------------------------------------------------------------------------
// Triangle
//-----------------------------------------------------------------------------
//
// Sets output to a triangle wave.
//
void Triangle (void)
{
}
//-----------------------------------------------------------------------------
// Saw
//-----------------------------------------------------------------------------
//
// Sets output to a saw tooth wave.
//
void Saw (void)
{
}
12
output_waveform = SINE;
// print this message: *** OUTPUT IS NOW A SINE WAVE
printf (“%sSINE WAVE%s”,string0,string1);
Print_Command_List();
output_waveform = SQUARE;
// print this message: *** OUTPUT IS NOW A SQUARE WAVE
printf (“%sSQUARE WAVE%s”,string0,string1);
Print_Command_List();
output_waveform = TRIANGLE;
// print this message: *** OUTPUT IS NOW A TRIANGLE WAVE
printf (“%sTRIANGLE WAVE%s”,string0,string1);
Print_Command_List();
output_waveform = SAW;
// print this message: *** OUTPUT IS NOW A SAW TOOTH WAVE
printf (“%sSAW TOOTH WAVE”,string0,string1);
Print_Command_List();
Rev. 1.1

Related parts for AN123