Rio Posted February 5, 2007 Report Share Posted February 5, 2007 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 warningsanscheinend wird das nicht in der LIB von TK unterstützt.gibt es eine Lösung? Quote Link to comment Share on other sites More sharing options...
mess Posted February 5, 2007 Report Share Posted February 5, 2007 Hi Rio depending on the resolution you need you could use a lookup table to get sine valuestake 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 needsright now 0 is 128 in the table, negative values are between 127 and 0 and so onif you need a custom lookup table (16bit, signed format) let me know Quote Link to comment Share on other sites More sharing options...
Rio Posted February 5, 2007 Author Report Share Posted February 5, 2007 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? Quote Link to comment Share on other sites More sharing options...
mess Posted February 5, 2007 Report Share Posted February 5, 2007 Yes he used the same methodthe only difference with between the sid and analog toolboxis that the sid table uses a table containing only one half of the sineand 'mirrors' this data to get the full wave to save memory.. Quote Link to comment Share on other sites More sharing options...
Rio Posted February 6, 2007 Author Report Share Posted February 6, 2007 you mean this file: sid_lfo_table.inc ? Quote Link to comment Share on other sites More sharing options...
mess Posted February 6, 2007 Report Share Posted February 6, 2007 no, it's called sid_sin_table.inc Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.