Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Understaning the code of following

Status
Not open for further replies.

thannara123

Advanced Member level 4
Joined
Jan 7, 2010
Messages
1,478
Helped
121
Reputation
242
Reaction score
111
Trophy points
1,353
Location
God's Own country India, Kerala
Activity points
9,606
I am learning the sinewave generation a great member Thahamid posted a blog in edabord as follwos

i didnt understand the working of following code anybody help me ?

TBL_POINTER_SHIFT = TBL_POINTER_NEW >> 11;
DUTY_CYCLE = TBL_POINTER_SHIFT;

what are the values of TBL_POINTER_SHIFT variable
it gets 1 when the TBL_POINTER_SHIFT become 2048 ,with lower the value it will be zero
am curiuos how the technique behind it ?
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
50,804
Helped
14,603
Reputation
29,481
Reaction score
13,687
Trophy points
1,393
Location
Bochum, Germany
Activity points
290,907
The variable names are somehow contra-intuitive.

It's basically a DDS generator. What they call TABLE_POINTER_xx is usually designated DDS accumulator. The upper 5 bits are used as index into the sine table.
 

    thannara123

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top