Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

informations about timers please

Status
Not open for further replies.

sudhavanib

Newbie level 4
Newbie level 4
Joined
May 28, 2007
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,311
decimal value of a5fe

hi,
actually i hav to generate pulses to rotate a stepper motor ,using microcontroller dallas .i have to do this by adjusting timer0 values.how to calculate th0,tl0 values .

i hav to write in embedded c code,using keil compiler.
i am getting confused.pls help me.
 

simple...
timer0 is 16 bit so maximum value =FFFF (65535 in decimal)
formula:
timer value= 65536-(delay value in us,ms,or second)/1.085us;
let u want to put a delay of 25ms..
then
ur required value=65536-25ms/1.085us; which=42494.525
in hex this=A5FE;
so wrie
TL0=0xFE;
TH0=0xA5;
y i put 65536 becoz timer flag becomes high after ffff+1;
y i put 1.085us..... its time for 1 machine cycle i.e
1/(crystal frequency / 12) crystal freq. 11.0592MHz in this case....
hope it will help u......
so must press the helped me button!!!!:D
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top