Jump to content

Sin Fkt.


Rio
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...