Rio Posted February 5, 2007 Report 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?
mess Posted February 5, 2007 Report 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
Rio Posted February 5, 2007 Author Report 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?
mess Posted February 5, 2007 Report 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..
Rio Posted February 6, 2007 Author Report Posted February 6, 2007 you mean this file: sid_lfo_table.inc ?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now