Electronic Components Datasheet Search |
|
AN123 Datasheet(PDF) 5 Page - Silicon Laboratories |
|
AN123 Datasheet(HTML) 5 Page - Silicon Laboratories |
5 / 16 page AN123 Rev. 1.1 5 Software Example //----------------------------------------------------------------------------- // DAC1_fgen1.c //----------------------------------------------------------------------------- // // AUTH: BW,FB // DATE: 2 OCT 01 // // Target: C8051F02x // Tool chain: KEIL C51 // // Description: // Example source code which outputs waveforms on DAC1. DAC1’s output is // scheduled to update at a rate determined by the constant // <SAMPLE_RATE_DAC>, managed and timed by Timer4. // // Implements a 256-entry full-cycle sine table of 16-bit precision. Other // waveforms supported are square, triangle, and saw tooth. // // The output frequency is determined by a 16-bit phase adder. // At each DAC update cycle, the phase adder value is added to a running // phase accumulator, <phase_accumulator>, the upper bits of which are used // to access the sine lookup table. // // The program is controlled through UART using HyperTerminal running on a // PC. All commands are two characters in length and have optional // frequency and amplitude arguments. Note that the amplitude parameter // cannot be specified unless the frequency is also specified. // // Command Format: // // XX [frequency] [amplitude] // // where XX denotes the command // // Command List: // // SQ - Square Wave // SI - Sine Wave // TR - Triangle Wave // SA - Saw Tooth Wave // OF - Output OFF // ?? - Help //----------------------------------------------------------------------------- // Includes //----------------------------------------------------------------------------- #include <c8051f020.h> // SFR declarations #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdlib.h> //----------------------------------------------------------------------------- // 16-bit SFR Definitions for ‘F02x //----------------------------------------------------------------------------- |
Similar Part No. - AN123 |
|
Similar Description - AN123 |
|
|
Link URL |
Privacy Policy |
ALLDATASHEET.NET |
Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
Family Site : ic2ic.com |
icmetro.com |