<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>timer interrupt</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/20605/timer-interrupt</link><description> 
Hi, i want to tune my timer ISR to 20hz , 1/20 sec , i dont know
what are the values to be loaded with the timer. 

 
 void timer0_isr (void) interrupt 1 using 1
{
unsigned i;
 TR0 = 0; /* stop timer 0 */
TL0 = ;
TH0 = ;
TR0 = 1;
overflow_count++;
</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: timer interrupt</title><link>https://community.arm.com/thread/112912?ContentTypeID=1</link><pubDate>Fri, 01 Jun 2007 05:50:36 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:40243636-9e31-4b07-bd90-1958f916a090</guid><dc:creator>Ahmed saleh</dc:creator><description>&lt;p&gt;&lt;p&gt;
thanks i got the idea&lt;br /&gt;
is this correct to make ISR at 15ms ~ 15hz ?&lt;/p&gt;

&lt;pre&gt;

static unsigned long overflow_count = 0;

void timer1_ISR (void) interrupt 3
{
overflow_count++;   /* Increment the overflow count */
}

/*------------------------------------------------
MAIN C function
------------------------------------------------*/
void main (void)
{

Set the Timer1 Run control bit.
--------------------------------------*/
TMOD &amp;amp;= 0xF0; // Clear all T0 bits (T1 left unchanged)
TMOD |= 0x01;
TH1 = 0xC5;
TL1 = 0x68;
ET1 = 1;                      /* Enable Timer 1 Interrupts */
TR1 = 1;                      /* Start Timer 1 Running */
EA = 1;                       /* Global Interrupt


while (1)
  {
  }
}






&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: timer interrupt</title><link>https://community.arm.com/thread/99272?ContentTypeID=1</link><pubDate>Fri, 01 Jun 2007 05:27:39 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3b684e96-d78d-4877-83e7-93a0cea4cac8</guid><dc:creator>Kalib Rahib</dc:creator><description>&lt;p&gt;&lt;p&gt;
50ms at 11.49MHz&lt;/p&gt;

&lt;p&gt;
50e-3/ (1 / ((11.49 * 1e6) / 12)) = 47875&lt;/p&gt;

&lt;p&gt;
Reload value = 65536 - 47875 = 17661&lt;/p&gt;

&lt;p&gt;
Reload HI = 17661 / 256 = 0x44 = 68&lt;br /&gt;
Reload LO = 17661 % 256 = 0xFD = 253&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: timer interrupt</title><link>https://community.arm.com/thread/75147?ContentTypeID=1</link><pubDate>Fri, 01 Jun 2007 05:12:27 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f18f313b-5ffd-4e6d-b782-db2a1f86ba92</guid><dc:creator>Ahmed saleh</dc:creator><description>&lt;p&gt;&lt;p&gt;
thanks for your reply , im using the usua 11.49 Mhz ,timer mode 16
bit with reload&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: timer interrupt</title><link>https://community.arm.com/thread/48188?ContentTypeID=1</link><pubDate>Fri, 01 Jun 2007 05:04:09 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:529f1480-9be9-4efe-8b89-eac54e102e52</guid><dc:creator>Kalib Rahib</dc:creator><description>&lt;p&gt;&lt;p&gt;
reload value will derpendd on clock frequenccy&lt;/p&gt;

&lt;p&gt;
also timer mode&lt;/p&gt;

&lt;p&gt;
what frequeency you be crystal use amd timer mode???????&lt;/p&gt;

&lt;p&gt;
you give info i help good&lt;/p&gt;

&lt;p&gt;
i am profesional and know x51 well&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>