Datasheet
www.ti.com
List 1. Complete Software Listing for a Sinewave Generator
**************************************************************************
* TITLE : THS5651 Interface routine *
* FILE : DAC.ASM *
* FUNCTION : MAIN *
* PROTOTYPE : void MAIN () *
* CALLS : N/A *
* PRECONDITION : N/A *
* POSTCONDITION : N/A *
* DESCRIPTION : main routine is used the generated a sine wave *
* : input for THS56x1 EVM using the ’C542 DSKplus board *
* AUTHOR : AAP Application Group, L. Philipose, Dallas *
* : CREATED 1999(C) BY TEXAS INSTRUMENTS INCORPORATED. *
* REFERENCE : TMS320C54x User’s Guide, TI 1997 *
* : Data Aquisation Circuits, TI 1999 *
**************************************************************************
.title “THS56x1 sine wave”
.mmregs
.width 80
.length 55
.version 542
.sect ”.vectors”
.copy ”vectors.asm”
.sect ”.data”
*global Variables
.global _sinewave
*Local Varibles
AD_DP .usect ”.variabl”, 0 ;
TEMP .usect ”.variabl”, 1 ; temporary variable
DAC_Sample .usect ”.variabl”, 1 ; last readed sample of channel 2
* Address Decoder constants:
DAC .set 00003h ; activate A2 when DAC1 is choosen
.sect ”.SINE”
sinevals:
.word 07FC0h ;sine wave table.
.word 0A800h ;
.word 0C780h ;
.word 0E300h ;
.word 0F380h ;
.word 0FFC0h ;
.word 0FEC0h ;
.word 0EB00h ;
.word 0D200h ;
.word 0B900h ;
.word 09440h ;
.word 07380h ;
.word 05280h ;
.word 03080h ;
.word 01900h ;
.word 00900h ;
.word 00000h ;
.word 01500h ;
.word 02A00h ;
.word 04580h ;
.word 05E80h ;
.sect ”.text”
_sinewave:
_MAIN:
START:
INITIALIZATION:
* copy interrupt routine, which are uncritical by the EVM to the IRQ table location:
DP = #1;
AR7 =#00200h;
38
Software SLAU032C– February 2001– Revised April 2011
Submit Documentation Feedback
Copyright © 2001–2011, Texas Instruments Incorporated