Measuring RPM's and display on 7 segment display
dbrake
Posts: 2
I have a fan with 3 wires - one of the wires is to monitor the RPM's. For every 2 revlovtions = 1 pulse from the fan.
I have used the count command to count every pulse for 1 second. I can view the pulses in the Debug window. Now I want that figure to display on the 4 7-Segment display. I have modified the clock program to display this. The only problem is that the refresh rate is poor. This is due to the count command to count the amount of pulses in one second. How can I display the amount of RPM's in real time.
I'm using the BS2 chip on a Professional Devolopment Board.
I have worked out the number of pulses to the RPM's.
4000 RPM fan / 2 = 2000 pulses.
2000 pulses / 60 = 33.3 pulses for 1 second.
I take the COUNT COMMAND capture for 1 second and then mutliply the figure by 120.
30 pulses = 3600 RPM's
Works fine on the Debug Console - displays figure on the 7 Segment display, but each of the 7 Segment display updates 1 second later.
eg.
Display 1 = 0
1 second later = Display 2 = 0
1 second later = Display 3 = 6
Again, 1 second later = Display 4 = 3
Total number = 3600, it just takes 4 seconds to complete the sequence - I want it to update at least 1 second with all displays at the same time. I know it's a programing issue - it's beging to drive me insane.
Any suggestions?
I have used the count command to count every pulse for 1 second. I can view the pulses in the Debug window. Now I want that figure to display on the 4 7-Segment display. I have modified the clock program to display this. The only problem is that the refresh rate is poor. This is due to the count command to count the amount of pulses in one second. How can I display the amount of RPM's in real time.
I'm using the BS2 chip on a Professional Devolopment Board.
I have worked out the number of pulses to the RPM's.
4000 RPM fan / 2 = 2000 pulses.
2000 pulses / 60 = 33.3 pulses for 1 second.
I take the COUNT COMMAND capture for 1 second and then mutliply the figure by 120.
30 pulses = 3600 RPM's
Works fine on the Debug Console - displays figure on the 7 Segment display, but each of the 7 Segment display updates 1 second later.
eg.
Display 1 = 0
1 second later = Display 2 = 0
1 second later = Display 3 = 6
Again, 1 second later = Display 4 = 3
Total number = 3600, it just takes 4 seconds to complete the sequence - I want it to update at least 1 second with all displays at the same time. I know it's a programing issue - it's beging to drive me insane.
Any suggestions?
BS2
5K
Comments
Please, please, please, if you're going to modify an existing program for a new purpose, figure out what the program does first and how the pieces work together. You'll learn something about programming and you'll understand better what's going on as you modify it.