thomasss 0 Posted April 29, 2014 Author Share Posted April 29, 2014 Hi everyone, Let me follow up with my results: (I finally got the time to write this post) First let me thanks everyone who has been helping in the previous messages and particularly enl for the very detailed last two msg. I finally decided to use a table with 1024 values (or every values of the ADC) (my code size was no more than 2782 bytes so I was fine with this) (I understand you can go to better accuracy but I was trying to make the all thing work before going into improving accuracy) Also I am using a MCP4822 (DAC) which have 12bit resolution. The sine and cosine were centered at 1.8V and amplitude peak to peak was 3.6V. How to (easily) construct the table: 1 - use excel: 0-1024 adc cos(x) acos(cos(x)) scaling for DAC 0-Pi A B=1-2/1023*A C=ACOS( D=C*4095/2/PI() E=Round(D) F=DectoHex(E)0 1 0 0 0 01 0.998044966 0.062540732 40.76026482 41 292 0.996089932 0.088460377 57.65312148 58 3A3 0.994134897 0.108359078 70.62189026 71 47 Quote Link to post 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.