| ??? 05/18/03 10:16 Read: times |
#45839 - RE: Pulses Counter Responding to: ???'s previous message |
Hatem,
I made a rev counter for a car a year or so ago. The revs where displayed on a 2 line 16 char LCD. The method I used was to use an external interrupt triggering on each rising edge of the incoming pulse. On the first interrupt you can start a timer, and on the next you can stop it and read its value. From this value you know (using some simple maths..) how many pulses you have per minute. To convert this number to an LCD you of course have to change the time you have to individual characters. So if you have say 3 characters (or digits..) you divide by 100 to get your first digit, then subtract your hundreds from your original number and divide by ten to get your second digit and so on. This of course has to be integer division, as you dont want any decimal places to the answer.. Unfortunately I dont have the code for my counter. It got lost in a horrible windows crash, along with all my other libraries... Let me know if you need any more spesific help.. Øyvind |
| Topic | Author | Date |
| Pulses Counter | 01/01/70 00:00 | |
| RE: Pulses Counter | 01/01/70 00:00 | |
| RE: Pulses Counter | 01/01/70 00:00 | |
| RE: Pulses Counter | 01/01/70 00:00 | |
| RE: Pulses Counter | 01/01/70 00:00 | |
| RE: Pulses Counter | 01/01/70 00:00 | |
| RE: Pulses Counter | 01/01/70 00:00 | |
| RE: Pulses Counter | 01/01/70 00:00 | |
| RE: Pulses Counter | 01/01/70 00:00 | |
RE: Pulses Counter | 01/01/70 00:00 | |
| RE: Pulses Counter | 01/01/70 00:00 | |
| RE: Pulses Counter | 01/01/70 00:00 | |
| RE: Pulses Counter | 01/01/70 00:00 | |
| RE: Pulses Counter | 01/01/70 00:00 | |
| RE: Pulses Counter | 01/01/70 00:00 | |
| RE: Pulses Counter | 01/01/70 00:00 | |
| RE: Pulses Counter | 01/01/70 00:00 | |
| RE: Pulses Counter | 01/01/70 00:00 | |
| RE: Pulses Counter | 01/01/70 00:00 | |
| RE: Pulses Counter | 01/01/70 00:00 |



