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.

LM628's PID data structure question

The LM628.pdf datasheet  http://www.ti.com/lit/ds/symlink/lm628.pdf,  page page 11 says: "The integral signal is maintained to 24 bits, but only the top 16 bits are used." This means the Integral part is right shifted by 8 (divided by 256). Then it coninues " The 16 bits are right-shifted eight positions and multiplied by filter coefficient ki to form the term which contributes to the motor control output." Does this mean the Integral part is right shifted by 16 now? However, Fig.19 of the app guide http://www.ti.com/lit/an/snoa184c/snoa184c.pdf shows the integral part is R shifted only 8bit before mult with Ki. Does anyone know for sure that it's shifted by 8 or 16 bits? I had posted my question to TI, and they refered me to this forum.

This is my first post, and I appreciate all of your helps.

Thanks,

Brian

  • Brian,

    I need to track down someone that is familiar with this device.  Please give us some more time.  

  • Hi Brian,

    The two documents are saying the same thing. Right shifting 8 positions is same as using 16msb of a 24 bit register in this case. Hope that clarifies things.

    Thanks and regards,

    Vijay

  • Hi Vijay,

    It's not clear on the datasheet as I stated in my post, and here I repeat again:

     " The 16 bits are right-shifted eight positions and multiplied by filter coefficient ki "

    The above statement means to me as the 16bits are futher right shifted again 8 bit , and this mean the original 24bit data had been shifted 16 times to the right -- not 8 as you see. Do you see the datasheet said it had been right shifted twice for a total 16 times?

    Brian

     

  • Hi Brian,

    I see that there is a possibility of confusion. Perhaps the language should have been clearer. I read it like this:

    "The 16 (most significant) bits are right shifted eight positions and multiplied b filter coefficiency ki".

     

  • Hi Vijay,

    If indeed the author wanted to use the top most significant 16 bits of the 24 bit result, then it should say like this "the 24-bit result is right shifted 8 positions and multiplied to the filter coefficient Ki", and should not say like this

    "The 16 (most significant) bits are right shifted eight positions and multiplied b filter coefficiency ki".

    because I read it as "the 16 bits are right shifted 8 position" and so the result is 8 bits, not 16, which is multiplied to Ki.

    Brian

  • Also, on  page 18 of the app guide http://www.ti.com/lit/an/snoa184c/snoa184c.pdf, Fig 18 shows the Kp is multiplied with the top 16 bit of the 24 bits register. Does this means error signal e(n) is right shifted by 8 before multiplied with kp? This is contradict with the datasheet. The more I read the document more it becomes unclear.

    Brian

  • Hello Team,

    Can I please get an update on this for the customer?

    Any assistance you can provide is greatly appreciated.

     

    Best regards,

    James Rose