This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

apparent inconsistency between header file and .c file in Example code (Example_posspeed)

Hello all, I am using a TMS320f28335 ezdsp and I am trying to get a 2048 line quadrature encoder to work. I am goin over the example code from the DSP2833X examples and inside Example_posspeed.h there is an int called mech_scaler. The comment says .9999/total count, total count = 4000. It is then initialized to 16776. However on line 146 of Example_posspeed.c it says that mech_scaler is the total count in 1 revolution. I would think that this value for me should be 2048*4, but this isnt consistent with the header. For one thing, .9999/total count should be less than 1,  and where 16776 came from eludes me anyway. Can anyone help? Thanks

Gideon

 

ps,

Sorry for the length, but two other quick questions if anyone has the time.

1) Is base rpm discussed in the example the maximum rpm the motor can produce?

2) What are the references to Q in the comments (ie, Q26 or Q26->Q15) ?

 

Thanks again