I need the range to be displayed on an LED bargraph - LM3914 prefrably.
I have the SRF04 echo captured through the CCP module, which results in a 16-bit value.
How do I scale the 16-bit value into a 4-bit representation to present to the VRef module to give me a voltage level proportional to the SRF04 echo signal length.
I'm sure there's a imple solution, but my mind has gone blank over this, and what little hair I have left is steadily being pulled out!
Thanks Nigel. I'll try it. Looks too simple!! I didn't consider that, but began thinking about all sorts of high level maths and bit manipulations.
I have the utmost respect for those among us who can see the simplest solution. Thanks again.
As to 'imple - and a few other spelling errors, I could, of course, blame a faulty keyboard, but it was more a case of late nights, trying to type too fast, and not checking my post!