Scaling fixed point ... comments ... experience?

1 post / 0 new
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


I posted a comp.dsp scaling question under the blog section for or you can find it on the google site too . If you have experience w/ scaling fixed point, please post it here (or here )!

I posted an article on comp.dsp about scaling for the megaAVR... here is the entire post as of today. Atmel has some discussion on scaling, but lacks detail as to find the appropriate scaling factor. Although this post is geared for 8 bits, the megaAVR has a 'virtual accumulator' that will accept more than 8 bits - and works similar to the 10bit ADC - using 2 8 bit registers to store the 10 bit (and wasting the remaining 6!)

Here is a bit from another post...

For readers that are unfamiliar with fixed point numbers:
There is nothing magic about putting the binary point at the right hand side of a byte, like we typically do. You know, bit positions are: 128,64,32,16,8,4,2,1,'binary point'.
The binary point can be anywhere. Putting it on the left is quite handy, and often done in DSP. All numbers are represented as a fraction between zero and 1. Then the bit positions of a byte are, from left to right:
'binary point',1/2, 1/4, 1/8, 1/16, 1/32, 1/64, 1/128, 1/256.
You can see than any number from zero to just below 1 can be represented this way, with limited precision. Of course, you can do it with more bits for more precision. Hint: This should remind you of the mantissa of a float.