Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - Is there a way to create 32 bit maths in PIC

(you are viewing a thread; or go back to list of threads)

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?
Fri Oct 23 2009, 23:14:11
(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.
Sat Oct 24 2009, 00:29:26
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):