A discrete time counter oscillator expressed in C code wil produce sine wave like signal:
P,P+ and g represents the current phase, next phase value, and increment value respectively. To implement this in software the register is simply a variable that retains its value between updates and the look up table is an array. In taking upper 5 bits of P into the array, the array will have 32 different values.

The Step frequency is the change in frequency when the increment value changes by one. The value Nr is the number of phase register bits, Fs is the update or sample frequency, and Fstep is the step frequency. For this project make Nr equal to 16 bits.
Fs
Fstep = --------
2Nr
can anyone write a program for it using pointers and array
....

Recommended Answers

All 4 Replies

Do you really think that others will do your work for you, just because you're too lazy to do it yourself? Give examples of your project, your existing material, how it will interface with this lookup table, etc, and a good reason explaining how it can be that you can do the rest of the project yourself but not this simple bit, and maybe someone will be prepared to help you. If it's your assignment that you can't be bothered to do yourself, then quit your course and let others have a chance to get on the course - others who can be bothered.

commented: lulz. +6

Oscillator, *now* tell us how you really feel about this thread, won't you?

;) ;)

brilliant first post, osc.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.