CP316: Microprocessor Systems and Interfacing 
   Counting and Timing 
  
Timing
  - used for
    
      - measuring time
- event logging
- task synchronization
- controlled delays 
 
- implementation
    
      - software loop
- polled timer
- interrupt timer 
 
- how accurate do you need the time? 
 
Counting
  - uses
    
      - measure speed by counting revolutions of a rotating shaft per unit
        time
- interface to a flow meter that generates pulses at a rate dependent
        on flow
- measure power output from an electricity meter
- count objects entering/leaving a system
- calibrate the position of printing on packaging by counting print head
        pulses 
 
- what do you 'count'
    
      - event count
- elapsed time 
- period count
- frequency count 
 
 
              Wilfrid Laurier University
            
              © 2019 Wilfrid Laurier University