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 5
Joined
Jan 7, 2010
Messages
1,580
Helped
122
Reputation
244
Reaction score
114
Trophy points
1,353
Location
India
Activity points
10,377
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 ?
 

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top