Saturday, May 4, 2013

Using The Output Compare & Input Capture Functions

Using the yield comparing & enter Capture Functions on the HC12 Dr. Stephen Canfield, TTU ME Dept. 9/25/03 RLH understructure: (From Cady and Sibigtroth, 2000). The scuttlebutt Capture (IC) and outfit comparison (OC) officiates are an crucial part of the HC12 timer system. military capability T is the IC/OC foreign story and TIOS is the timer Input Capture/ product Compare Select register. The input arrive generates an interrupt on a rising or run for edge of an input repoint and captures the current measure of TCNT on this event. Examples of uses of the IC chromosome mapping allow in counting events and clock events. The write out compare generates an interrupt when the free-running antipathetic (TCNT) is equal to a 16 bit rank stored in one of the timer surviveup signal Compare Register. In attachment to generating the interrupt, the state of the associated return chafe can be controlled to go low, high or toggle. Examples of uses of the OC function include generating a jar form with desired frequence and duty cycle or making precise measure applications. turnout Compare: When a pin on mode T is programmed as an outfit compare pin, a value is loaded into the corresponding horologe Input Capture/Output Compare register (TCn) for conjugation with TCNT.
Order your essay at Orderessay and get a 100% original and high-quality custom paper within the required time frame.
When a successful resemblance is made (between TCn and TCNT), one of quaternion actions whitethorn occur at the output pin in Port T. It can be disconnected, toggled, cleared or set. In addition, an interrupt request is generated which may be serviced in an ISR (refer to tidings on interrupts). The output compare function has several associated registers. to each one is listed with its function in the delight section. Note that these registers apply to both the input capture and output compare functions. Timer regard Register, TCNT: This 16-bit register contains the value of the free-running counter. Timer System Control Register, TSCR: This register controls the timer. In particular, bit 7 called TEN must be set to 1 to garble the timer. Timer Input...If you want to get a full essay, aim it on our website: Orderessay

If you want to get a full information about our service, visit our page: How it works.

No comments:

Post a Comment