Search Engine

8051 Timer Delay

Add Question

36 Threads found on 8051 Timer Delay
hello Q=20Mhz MC=0,60?S if 8051 timer is similar to PIC timer you need to spend 1666 * 0,6 => 1 mS load the timer with 65535-1666=63869 .. TH0= 0xF9; //initial value for 1ms TL0 = 0x7D; 0xF97D => 63869 so seems to be OK if timer has no prescaler or potsscaler and use MC (...)
brother the procedure is same for any processor, let me expain... this code is for pic, i never worked on 8051 processor but still the idea remains same for any processur although the language is diff... the delay is only the time for what we keep the processor busy in any useless work.. in my code i filled three variable with 255 decimal val
hi frnds....... here i am posting my code to generate 1s delay using timer 0 in lpc2148. link to learn 8051 Fosc=12Mhz CCLK=60Mhz PCLK=60Mhz but this code is not generating desired delay :cry: so correct my code.... thank u :thumbsup: #include
Xtal=11.0592MHz,time delay of 5ms(milliseconds).solution 11.0592MHz/12 ,the counter counts up every 1.085us.clocks= 5ms/1.085us =4608 clocks,TL and TH the value 65536-4608 =60928=EE00H.TH=EE.Assuming I want time delay of 360 seconds how can I calculate it using this formula
i have doubt in delay... i have to give the 1 ms delay without using timer.. how can i??? You will need to use the polling method for this, i.e. looping for some time. like the same "for" loop example you gave. for(i=0;i<1275;i++); According to some examples in the book on 8051 by Mazidi, it will give a (...)
With 22MHz the time unit is not 0.5us but roughly 0.545us To get 1ms delay the reload values are: 65536-1835=63701 => F8 D5 (1ms ≈ 1835 * 0.545us) Use timer 0 of 8051 in MODE1 (16 bit timer) ... delay: MOV TMOD,#00000001B // Sets timer 0 to MODE1 (16 bit (...)
I am trying to produce delay of 1/20 s (50 ms) using timer/counter 0. Crystal frequency is 11.0592 MHz and machine cycle is 11.085?s. for 50ms the machine cycles required is 46079 decimal. The counter is to be loaded with 65536-46079=19457=4C01Hex TH0=04CH and TL0=01H. SETB TR0 initiates timing and Polling TF0 gives the end of the required t
Sir, i am having stepper motor of 2 degree step angle. I m using following c program: #include void main() { while(1) { void delay (int); P1=0xCC; delay(1); P1=0x66; delay(1); P1=0x33; delay(1); P1=0x99; delay(1); } } void (...)
hey guys, i tried to delay tyristor using timer. i used to use delay(5);. delay(4);, and delay(3); it works, but my LCD that shows adc value is not shows it well. so i want to use timer for delay. my tmod is 0x10. my xtal is 11.0592MHz but the problem is it seems the (...)
hi, im using the timer newly and i dono how to create a delay value for 1sec. please anyone help me how to program or what the value i should need to give for the timer registers. and im using a 12MHz crystal. 8051 timers use 1/12 of the crystal frequency regardless of machine cycle. Thus (...)
kindly metion a programme which will implement timer of 8051 microcontrollerin vhdl
I am trying to get delay of one second using nested loops in 8051 assembly, use of timer will simplify this but it is required to do it this way! Is this calculation OK ? In implementation it is taking around 10 seconds instead of one second. WAIT: MOV R2,#46 HERE1: MOV R3,#100 HERE2: MOV R4,#100 HERE3: DJNZ R4,HERE3 (...)
Hey guys i am having a serious problem. The following program compiles successfully but when i turn on the system, there wont be be timer (caused) delay ( which can be set via some switches) after looking for long time, i figured that the timer 0 ISR is not being served. Since, I am new to MickroC compiler for 8051. Help (...)
hello all, I've been trying to generate a delay of say 1ms using timer0 in 89c52 but the simulation log is showing timer0 overflow all the time.I don't know what is the reason behind that. below is my code #include < at89x52.h> // Header file for AT89S52 void timer0_init(const unsigned int x); void (...)
hey! guys i wanted to use the timer 2 of 8051 to use it as the multiplexing delay for seven segment led display. So guys if anyone of u know how can i use timer 2 of 8051 please give the pseudocode or C code or assembly code will work too. thanks
I think you are confusing a timer and a rtc ... in a timer you can specify a delay in a rtc you can specify a time (hour minute second) and a date (day month year) you have timers in a 8051, but you don't have any rtc in a standard 8051 ...
It is not such difficulty, use 8051 timers Here link for "8051 Time delay/timer routine calculator " 8051 Time delay/timer routine calculator / 8051 software / Downloads : 8051 Microcontroller Projects AVR PIC Projects (...)
hi, how can i use mode 0 of timer in programming? for eg: if i want to produce a delay of 10 micro seconds in mode 0, what should i give in TH0 and TL0 registers? please explain...
You could use a software delay, however a more efficient method would be to use a timer and interrupt. You can set the timer to 1/2 period of the square wave and switch states from high to low and low to high using the timer interrupt. Using a timer would also offload the work to the generate the PWM, to (...)