Hi All,
Well its back to the Watertank project again.
I'm using a single 28x2 chip running at 64mhz with an external crystal to handle all task's which include:
20x4 Display
Multiple Button detections
Ultrasonic module data
Bluetooth data for an App
Controlling a Pump and Valve
Sounding a beeper, all in a big loop that seems to work ok.
I have been using the COUNT command to integrate a flow sensor into the project. It also counts liters pumped and stops pumping when the programmed amount of liters is reached. My problem is that using the COUNT command is only accurate using a long count period but this interferes with the loop in processing other task's. I've been playing around with the PULSIN command but haven't figured out the math's needed to make it work. Could someone be able to give me a few pointers in the right direction? I'm not sure if PULSIN would even work seeing that it does not measure the period, only the length of the pulse. I have included a PDF of the sensor used. I'm working on the basis of a 50% duty cycle...
Cheers, Kurt
Well its back to the Watertank project again.
I'm using a single 28x2 chip running at 64mhz with an external crystal to handle all task's which include:
20x4 Display
Multiple Button detections
Ultrasonic module data
Bluetooth data for an App
Controlling a Pump and Valve
Sounding a beeper, all in a big loop that seems to work ok.
I have been using the COUNT command to integrate a flow sensor into the project. It also counts liters pumped and stops pumping when the programmed amount of liters is reached. My problem is that using the COUNT command is only accurate using a long count period but this interferes with the loop in processing other task's. I've been playing around with the PULSIN command but haven't figured out the math's needed to make it work. Could someone be able to give me a few pointers in the right direction? I'm not sure if PULSIN would even work seeing that it does not measure the period, only the length of the pulse. I have included a PDF of the sensor used. I'm working on the basis of a 50% duty cycle...
Cheers, Kurt
Attachments
-
359.2 KB Views: 22
Last edited: