H
hbaocr
Guest
hello;
Man ir padarīt piemēram kods IRQ taimeris match0 un man som problēmas
please help me!Tāpēc mans programma cilpa pie ISRIRQ_Match0_timer0 forever (atgriezties un pēc tam nekavējoties pāriet uz ISR atkal un atkal bez darba funkciju pamata programmai pieaugums vērtību). Tātad variabe f sākotnēji izmaiņu (f =) pēc pirmās spēles notiek, un, kamēr citas spēles notiek pēc tam, variale nemaina (tā nepalielinās)# include "LPC214x.H"
# include "stdio.h"
/ / CCLK = 12xM = 12x5 = 60MHZ
/ / PCLK = CCLK (VPBDIV = 0x00)
anulēts IRQ_Match0_timer0 (spēkā neesošs) __irq;
unsigned int;
unsigned int F;
int main ()
(
/ / int timer0
T0TCR = 0x3; / / TC un PR skaits ļauj
T0PR = 59; / / tan tik dem Cua TC = PCLK / (PR 1) = 1MHz-> 1us
T0MCR = 0x1; / / pārtraukt match0 iespēju un TC reset, kad spēles
T0MR0 = 3; / / 10us par TC sasniedz līdz T0MR0 un notiek match0
/ / pārtraukt
VICVectCntl0 = 0x24; / / izvēlēties Source Int Timer0 = 4, un lai IRQ slot
VICVectAddr0 = (unsigned) IRQ_Match0_timer0;
VICIntEnable = 1 <<4; / / Enable Timer0 pārtraukt avots
T0TCR = 0x1;
while (1)
(
;
)
)
anulēts IRQ_Match0_timer0 (spēkā neesošs) __irq
(
f =;
T0IR = 0;
VICVectAddr = 0x00000000; / / Reset Global pārtraukt un atgriezties
)
Man ir padarīt piemēram kods IRQ taimeris match0 un man som problēmas
please help me!Tāpēc mans programma cilpa pie ISRIRQ_Match0_timer0 forever (atgriezties un pēc tam nekavējoties pāriet uz ISR atkal un atkal bez darba funkciju pamata programmai pieaugums vērtību). Tātad variabe f sākotnēji izmaiņu (f =) pēc pirmās spēles notiek, un, kamēr citas spēles notiek pēc tam, variale nemaina (tā nepalielinās)# include "LPC214x.H"
# include "stdio.h"
/ / CCLK = 12xM = 12x5 = 60MHZ
/ / PCLK = CCLK (VPBDIV = 0x00)
anulēts IRQ_Match0_timer0 (spēkā neesošs) __irq;
unsigned int;
unsigned int F;
int main ()
(
/ / int timer0
T0TCR = 0x3; / / TC un PR skaits ļauj
T0PR = 59; / / tan tik dem Cua TC = PCLK / (PR 1) = 1MHz-> 1us
T0MCR = 0x1; / / pārtraukt match0 iespēju un TC reset, kad spēles
T0MR0 = 3; / / 10us par TC sasniedz līdz T0MR0 un notiek match0
/ / pārtraukt
VICVectCntl0 = 0x24; / / izvēlēties Source Int Timer0 = 4, un lai IRQ slot
VICVectAddr0 = (unsigned) IRQ_Match0_timer0;
VICIntEnable = 1 <<4; / / Enable Timer0 pārtraukt avots
T0TCR = 0x1;
while (1)
(
;
)
)
anulēts IRQ_Match0_timer0 (spēkā neesošs) __irq
(
f =;
T0IR = 0;
VICVectAddr = 0x00000000; / / Reset Global pārtraukt un atgriezties
)