Hi jjw,
Sent flowchart via pm as you want it kept private.
Gets more complex since floats round to a few decimal places.
I had to place routines to round to 1 decimal place:
I have not tested this on hardware as not got the time to make the hardware up again.
I would recommend you use the step function and follow how the flowchart works.
Then if you have an issue you will be about to debug yourself,
That help to gain knowledge to enablule you to develop your own flowcharts.
To give you an idea how much Floats can take up.
Your flowchart without ROM uses:
Code: Select all
Memory Usage Report
===================
RAM available:768 bytes, used:91 bytes (11.9%), free:677 bytes (88.1%),
Heap size:677 bytes, Heap max single alloc:127 bytes
ROM available:16384 bytes, used:4066 bytes (24.9%), free:12318 bytes (75.1%)
With floats added now uses:
Code: Select all
Memory Usage Report
===================
RAM available:768 bytes, used:153 bytes (20.0%), free:615 bytes (80.0%),
Heap size:615 bytes, Heap max single alloc:127 bytes
ROM available:16384 bytes, used:10596 bytes (64.7%), free:5788 bytes (35.3%)
i.e a difference of 6530 Bytes.Hence me stating if not much memory like the older 16F series then using floats is not recommended or practical depending on initial memory size.
Martin