Hello,
In c2000 ware:
HRCAP HCCal Calibration Library Readme
=======================================
For documentation on the HRCAP HCCal calibration library, refer to the High-Resolution Capture (HRCAP) chapter of your device-specific Technical Reference Manual.
In SPRUH18G–January 2011–Revised April 2017 in 5.5 HRCAP Calibration Library p.417 - it talks about Q16 + fractional format.
Does the fractional part returned by the library represent a number from 0 to 65535?  And, for instance, if it were to be rounded, anything above 32,767 gets rounded up and anything below
just uses the Q16 integer part, as an example of how the fractional part would be rounded up or down?
Since this is a library call and there's no source available to us mere mortals for the library - I want to be a little pragmatic on how to convert the fractional part back to a decimal if I were to convert
to a floating point number and/or just round whole counts up depending on the value of the fractional part.  (We never have negative numbers returned from the library, correct?)
The resultant is being fed back into a PID; so having a floating point number probably won't hurt - it's just a count off if the rounding is incorrect.
Please let me know if this is the correct way to look at this; again; not a whole lot of documentation that I can find anyway on the HRCAP lib usage for an actual fractional conversion.
Yes, it's Q16 but this is being returned from a lib that I don't have source to. None of the device example code covers this either.
Thanks In Advance,
John
 
				 
		 
					 
                           
				