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 (...)
What is the exact 8051 variant you are using, AT89S51, C8051F120, etc? BigDog
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...
hello! i´am using the 8051 microcontroller with 12MHZ crystal, and i want to generate a square wave with the frequency of 5KHZ which gives a 50% of duty cycle. how can i control delay time thar i have to use?and how i can do to control it. The last question that i have is why does i have to use CSEG AT ..... ??? ---------
hi friends..i m using mc having crystal frequency 11.0592 MHz.. i want to generate delay of (4.752ms and 1.726ms) in my program using timers..i am confused with loading the timer plz help me
hello ...i need some help in gnerating time delay of exact 5 second does this code is corect..?? but in simulation and in hardware it does not work ... _______________________________________________________________________ #include unsigned char Ali={0,1,2,4,8,16,32,64,128}; sbit led=P1^1; unsigned char k,i; void delay() { TMO
check this Downloads / 8051 software / 8051 Time delay/timer routine calculator : 8051 Microcontroller Projects AVR PIC Projects Tutorials Ebooks Libraries codes
May i know is it 8051 manage to send high frequency square pulse such as 40khz or 25 micro second for a period pulse out from their pin? (ultrasonic use purpose) as i know, 8051 only support max 24mhz crystal and after divide 12cycles per instruction mean every instruction it will take 0.5micro. in this case, if we use interrupt to make the p
Hi, You can use software PWM, then feed this to RC filter to get a smooth output and then into op amp for amplification (gain = 2). For software PWM, use the internal timer module or delay timing. Check this link for some information about implementing PWM: Pulse Width M
sir i saw a 8051 based software that generate automatic code for at89 series and 90 series.have to select just timer and delay and type of micro controller.after that have to select the port input and output just clicking by mouse. in generate button by clicking it exactly generate the code or hex or bin file. i saw a person is doing that (...)
You can program 8051 to have delay(s) dependant on two pins: increase and decrease .. Adding external timer to change something while a microcontroller is seating nearby doesn’t make sense .. Rgds, IanP :|
Don't you need to explicitly tell the compiler what is the interrupt code and also set the interrupt vector properly? I'm not familiar with the 8051 but you may also have to write an interrupt handler to check what triggered the interrupt and pass control to the correct interrupt code. It should look like this: interrupt address: jump to i
dose any 1 have schematic or code.i cant find any Here is a simple circuit using pic You can modify it to 8051, just connect ZCD to int0 Nandhu
I want to generate square wave oscillation using uc8051 with fixed duty cycle say 50% but i want to be able to change the frequency of oscillation from 1Hz to 2KHz by keying in the required value and make the uc generate it. 12MHz crystal oscillator is used. pls, i need help on how to do this. I use asm code. Thanks all. :D
Can someone help me understand why TH1 and TL1 are set to -230? void Inittimer1() { char tmp; tmp = TMOD; tmp &= 0xCF; //for 8bit auto loader mode tmp |= 0x20; // T1M1 = 1, T1M0 = 0 TMOD = tmp; //for timer1 interrupt at every 250uS TH1 = -230; //to be calculated according to the system clock TL1 = -230; TR1 = 1;
use one 8 bit controller say 8051. the timer can be uesd for the time count. the count can be set permanently in the program or can be changed by a keypad/ dip switch if required. u can use led/ buzzer/speaker or all of them as outputs.. thats your choice..
have any function code for 8051 , like use sine cosine tan ..
Hi all, Please provide me with how i can use one of the 8051 timers to calculate a time delay equal 1 second. I'm using XTAL frequncy 11.0592 MHz. Regards. is the best solution, it will teach you how to calculate delay. I am also personally using it and its result is near 100% correct. regards