??? 05/23/08 06:57 Read: times Msg Score: 0 -1 Answer is Wrong +1 Good Answer/Helpful |
#155054 - capture and compare Responding to: ???'s previous message |
A capture is a record of the timer count when a specific event occurs. When the control registers of Timer and the specific capture compare module have been properly configured, then the capture will record the count in the timer when the pin in question makes a specific transition (either from low to high or any transition). This capturing event can be used to trigger an interrupt so that the data can be processed before the next event. In combination with the rollover interrupt on Capture module 0, you can measure intervals longer than 1 cycle.
A compare operation is less intuitive than the capture, but it is basically the inverse of a capture. While capture mode is used to measure the time of an incoming pulse width modulation signal (a signal whose information is encoded by the time variation between signal edges), compare mode is used to generate a pulse width modulation (PWM) signal. When the timer reaches the value in a compare register, the module will give an interrupt and change the state of an output according to the other mode bits. By updating the compare register numbers, you change the timing of the signal level transitions. This may sound somewhat complicated, but the basic concept of measuring (input) or controlling (output) the time interval between high to low and low to high transitions is all you need to know to start with. The MSP capture/compare modules have many different ways to perform each operation. This can be somewhat overwhelming, but it allows the microprocessor to handle inputs from a greater variety of other components. Capturing and comparing are done with the same modules, and each one can be configured individually. They can also be grouped using the TACTL to trigger the capture compare registers to load simultaneously (useful for compare mode). |
Topic | Author | Date |
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 |