ChipCenter Questlink
SEARCH CHIPCENTER
Search Type:
Search for:




Knowledge Centers
Product Reviews
Data Sheets
Guides & Experts
News
International
Ask Us
Circuit Cellar Online
App Notes
NetSeminars
Careers
Resources
FAQ
EE Times Network
Electronics Group Sites

Questions 7&8


Circuit Cellar Online
THE MAGAZINE FOR COMPUTER APPLICATIONS
Circuit Cellar Online offers articles illustrating creative solutions
and unique applications through complete projects, practical
tutorials, and useful design techniques.

WHAT'S YOUR ENGINEERING QUOTIENT?

Test Your EQ•Homerun?

Problem 7—A test engineer has just given you a report indicating that the output of a DAC has a slight phase jitter. The engineer suspects this code fragment is the culprit, but you know the lookup table entries have already been loaded correctly. Can you identify the problem with this information?

#define TABSIZ 257
static short dac_sine_val[TABSIZ];
short dac_value(void) {
static unsigned short ix=0;
return (dac_sine_val[ ix++ % TABSIZ ]);
}

ANSWER Go


Problem 8—The following function will evaluate an order-n polynomial for value x. By inspection, you can see that the function will perform 2n multiplications for an order-n polynomial. Can you significantly reduce the number of multipilcation operations required by this function?

float evalpoly(float x, float *coeff, int order) {
float sum, xprod;
int i;
xprod = 1.0; sum = 0.0;
for (i=0; i<order; i++) {
sum += coeff[i] * xprod;
xprod *= x;
}
return (sum);
}

ANSWER Go

11--99

Click here to get your listing up.

Copyright © 2003 ChipCenter-QuestLink
About ChipCenter-Questlink  Contact Us  Privacy Statement   Advertising Information  FAQ