Is there a way to create 32 bit maths in PIC (by Evan Raftery)
Am investigating the feasibility of getting a pic to do the maths on a flow rate of water meter. The signal is generated from a hall effect sensor reading a rotating turbine. (16 pulses per litre & range between 0 - 250Litre).
Because I have to get a reasonably good definition of flow in a PLC I use 32bit maths to do the multiplication & division for the output answer withut going into overflow or underflow.
In a pic can two consecutive 16 bit memory areas in a pic be combined to give a 32bit area? Is there a way of creating 32bit maths to take advantage of this? I may be off the track and is there another way of achieving this using 16bit?
(no subject) (by Jonathan Westhues)
It's possible, though rather cumbersome.
But most applications that require accuracy of around a percent can easily be expressed in 16-bit integer math. Try to choose your units to make best use of the available precision, and post if you still have problems.