Yep, I understood the compiler problems from the get-go. However, the fact that, in 15 seconds, I could type that line of code, and not have to think about it, was very nice. That's what initial testing was for. The initial idea was just to see if the darn idea was going to work in the first place. And it most definitely did, so now it's time to find the right tool for the job and get it actually working well. :) I haven't had to do fixed point math in years. This should be fun. :) That and making this PWM stuff work. -David -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of Alan B. Pearce Sent: Monday, July 18, 2005 3:16 AM To: Microcontroller discussion list - Public. Subject: Re: [PIC] Looking for a PIC with ADC, DAC, and UART... >Simple - typing: > >WORD Output = pow(input,somepower); > >is a lot easier than writing my own fixed point function, when the >compiler does it for me. Rapid Application Development at its finest. > >For the PIC, obviously I'm just going to have to write/find something >written in fixed point. Yes, but ---- As you have already discovered, the compiler is likely to pull in a heap of floating point code to do the calculation (slow) and then convert it to fixed point. Now this may be fine for a get-you-up-and-running-to-test-the-idea type solution, but is not an efficient way to do it, and also suggests that you may be missing or introducing some underlying side effect which could have an effect on the end performance. Do think through the math and how to do it in fixed point (faster) and what the calculation is actually doing. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist