Jump to content

Recommended Posts

Posted

Ist es möglich eine Sinus funktion zu verwenden?

Wenn ich die math.h verwenden will kommt immer das:

sdcc: Calling preprocessor...
sdcc: Generating code...
==========================================================================
Linking project
error: missing definition for symbol "_sinf", required by "_output\main.o"
ERROR!
Process terminated with status 1 (0 minutes, 3 seconds)
0 errors, 0 warnings

anscheinend wird das nicht in der LIB von TK unterstützt.

gibt es eine Lösung?

Posted

Hi Rio depending on the resolution you need

you could use a lookup table to get sine values

take a look at the analog toolbox project (I think you can find the table in map.c)

the only problem with is that you will have to scale the output to your needs

right now 0 is 128 in the table, negative values are between 127 and 0 and so on

if you need a custom lookup table (16bit, signed format) let me know

Posted

I'll take a look into ;)

i don't know how tk did it on MBSID Application?

Does he used a lookup table too or a function for that?

Posted

Yes he used the same method

the only difference with between the sid and analog toolbox

is that the sid table uses a table containing only one half of the sine

and 'mirrors' this data to get the full wave to save memory..

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...