Advertisement
jh_elec

untitled

Aug 19th, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. void timerCMPInit( TC0_t *tim ){ /* Timer (TC0) * Wird hier auf Compare Match Interrupt konfiguriert * Konfigurationen sind in "timer.h" vorzunehmen */ tim->CTRLA = TIMER_PRESCALER_gc; // Takt konfigurieren ( mit ggf. Vorteiler ) tim->CTRLB = ( TC0_CCAEN_bm | TC0_WGMODE0_bm ); // Compare Match 'A' aktivieren tim->CCA = TIMER_CALC; // Compare Match Wert tim->INTCTRLB = TC_CCAINTLVL_HI_gc; // Interrupt "Compare Match" aktivieren / Priorität des Interrupts festlegen} 
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement