If you are using input capture interrupt, and using more than one
channel on the timer module, be sure to check item Timer.1 on latest
errata sheet.
--- In lpc2000@yahoogroups.com, "bpesun" <bpesun@y...> wrote:
>
> I am using 2114,and I want to use input capture to measure the
pusle.
> but i can't into the interrupt.DOes any people have done that?Can i
> see your code?
> the following is my code,but it can/t go to interrupt.
> /******************************************
> * Ãû³Æ : void Timer_Init(void)
> * ¹¦ÄÜÃèÊö: ¶¨Ê±Æ÷0ÖжϷþÎñ³ÌÐò
> * ÊäÈë²ÎÁ¿: ÎÞ
> * Êä³ö²ÎÁ¿: ÎÞ
> * µ÷ÓÃ×Ó³Ì: ÎÞ
> * ʹÓ÷½·¨:
> --------------¡ª*/
> void __irq IRQ_Timer1(void)
> {
> Prints("int");//this is my debug function
> if( (IO0SET&LEDCON) == 0 ) IO0SET = LEDCON;
> else IO0CLR = LEDCON;
>
> T1IR = 0x02;
> // Çå³ýÖжϱêÖ¾
> VICVectAddr = 0x00;
> // ֪ͨVICÖжϴ¦Àí½áÊø
> }
>
>
>
> void Timer1Init(void)
> {
> T1PR = 99;
> T1CCR |= (1<<9);
> T1CCR |= (1<<10); //cap1.3ÉÏϽµÑØÌø±ä½«TCÄÚÈÝ×°ÈëCR3
> T1CCR |= (1<<11); //cap1.3Éϲ¶»ñ×°ÔØ²úÉúÖжÏ
> T1IR|=0x80; //Çå³ýÖжϱêÖ¾
> T1TCR = 0x03;
> T1TCR = 0x01;
>
> VICIntSelect = 0x00000000;
>
> VICVectCntl0 = 0x20|5;
> VICVectAddr0 = (uint32)IRQ_Timer0;
>
> ICIntEnable = (1<<5);
> PINSEL1|=(1<<10);
> PINSEL1|=(1<<11); //
>
> }Message
Re: Do you have code about input capture
2005-01-06 by lp2000c
Attachments
- No local attachments were found for this message.