正弦波
//-----------------------------------------------------------------------------
// F41x_DACs_SineCosine.c
//-----------------------------------------------------------------------------
// Copyright 2006 Silicon Laboratories, Inc.
// http://www.silabs.com
//
// Program Description:
//
// This program outputs sine and cosine waveforms using the hardware DACs
// on the C8051F410 microcontroller.
The waveforms are output on pins
// P0.0/IDA0 and P0.1/IDA1.
//
// The output of the DACs is updated upon a Timer3 interrupt.
The Timer3 ISR
// then calculates the output of the DACs for the next interrupt.
//
// The frequency of the output waveforms is set by the #define .
//
//
// How To Test:
//
// 1) Download the code to an C8051F410 Development Board
// 2) Check that the J6 and J16 shorting blocks are not installed.
This
//
ensures that the IDAC outputs are not connected to any other pins
// 3) Check that the J13 and J14 short blocks are installed. This connects
//
the DAC outputs to resistors so that the output current is converted
//
to a voltage
// 4) Connect two oscillscope probes to pins P0.0/IDA0 and P0.1/IDA1.
//
These pins are available on both the J2 and J11 headers.
// 5) Confirm that there are two waveforms with the output of DAC1 leading
//
the output DAC0 by 90 degrees.
The frequency of both waveforms should
//
be close to frequency defined by
//
// FID:
41X000036
// Target:
C8051F41x
// Tool chain:
Keil C51 7.50 / Keil EV
AL C51
//
Silicon Laboratories IDE version 2.71
// Command Line:
Default
//
// Release 1.0
//
-Initial Revision (GP)
//
-09 AUG 2006