Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/22/08 07:48
Read: times


 
#155031 - CAPCOM unit
Responding to: ???'s previous message
Intel have a document on the capture/compare unit that should explain all you need to know, but basically you have a timer (16bits) that counts at a given rate. For the capture you have a 16 bit register that gets loaded when an external event connected to a capture pin changes state (usually you can set a low->high, high->low or both) which then copies the current timer value into the capture register. An interrupt can optional be enabled to signal this event to the code.

For a compare, you have a 16 bit register. When the timer value equals the compare register value a interrupt can be activated and/or a port pin can be set high,low or toggled.

What would you use these for? Measuring time, pulse width etc for a capture. For a compare - generating a frequency, pwm etc.

My light dimmers use a capture input to measure the period of the mains cycle and to synchronise compare events to trigger triacs.


List of 5 messages in thread
TopicAuthorDate
capture compare modes            01/01/70 00:00      
   CAPCOM unit            01/01/70 00:00      
      here            01/01/70 00:00      
   capture and compare            01/01/70 00:00      
      there may be some '51s that have TACTL, I know of            01/01/70 00:00      

Back to Subject List