Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/24/10 13:37
Modified:
  03/24/10 13:46

Read: times


 
#174473 - Timers Reply
Responding to: ???'s previous message
Andy Neil said:
Yaniv K. said:
I am not completely clear on Timers, how do I make a timer count 1milisecond as accurately as possible?

Have you looked at the Turorials on this site yet?

Have you checked the Keil site for examples?

Have you checked the chip manufacturer's site for examples?


I did, its all for assembler so I am unsure as just how to convert it into C format.

for example, lets assume I do:

void delay(long a)
{
long i;
for(i=0;i<a;i++)
{
TL1=18;
TH1=00;
TMOD=0x10;
TR1=1;
while(!TF1);
}
}
 

with a 24KHz Crystal. will I get 1 milisec delay or will the function take up additional cycles messing up the delay.

List of 15 messages in thread
TopicAuthorDate
Atmel 89C5131A-UM Internal memory programming            01/01/70 00:00      
   compiler specific            01/01/70 00:00      
      Reply            01/01/70 00:00      
         Sample code?            01/01/70 00:00      
   Timers            01/01/70 00:00      
      Timers Reply            01/01/70 00:00      
         Have you looked at the tutorials yet?            01/01/70 00:00      
         it's all for assembler - but that doesn't matter!            01/01/70 00:00      
   Huge amounts of data            01/01/70 00:00      
      disregard the large numbers            01/01/70 00:00      
         No compiler support for EEPROM            01/01/70 00:00      
            compiler handling the EEPROM transparently            01/01/70 00:00      
               I did not know Keil helper functions.            01/01/70 00:00      
                  It's part of the "xdata banking" support            01/01/70 00:00      
                     Previously, on 8052.com...            01/01/70 00:00      

Back to Subject List