Search Engine www.edaboard.com

8051 Timer Delay

Add Question

75 Threads found on edaboard.com: 8051 Timer Delay
have any function code for 8051 , like use sine cosine tan ..
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 (...)
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;
check this Downloads / 8051 software / 8051 Time delay/timer routine calculator : 8051 Microcontroller Projects AVR PIC Projects Tutorials Ebooks Libraries codes
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
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...
go through this following link for timer 1 and timer 0 operation second question i think the timer 2 is also 16 bit timer which can produce a maximum delay of .07 sec de
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 (...)
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
Dear Gauiver, Perhaps you can help me: I have just realized a Clock and timer with AT89C2051 in fact it is a clock and a downcounter and other little features. (the display is on 6 seven-segments led display using MAX7219) in fact I have realized the downcounter routine using a delay of 1s; Would their not be a clever way to count the seconds
Time8051.zip 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
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.
thx for ur great help!
Try this .. Goto: In this website you will find circuit diaram of ultrasonic device and hints on how to modify it for 8051 microcontroller .. Regards, IanP
I want to count 1 miniute or few miniute in the ?c(8051) without using interrupt, how can I do? THX~
here's another one works in a dos window. Just double click the time8051.bat file to run in a dos window in any windows 98, XP, etc.
This topic has been discussed here for several times .. It's just the matter of using SEARCH .. Here is one example: Regards, IanP
can anyone give me a sub routine which gives 2s delay in 8051 in assembly language
first make sure that your 8051 receives data from GPS .. most of GPS devices output 0-5V ASCII string(s) and MAX232 will not recognize it as a valid RS-232 signal .. if this is the case all what you need to do is just to invert the signal from GPS using a gate or a single transistor inverter .. rgds, ianp
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
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
Hi, I am implementing an up/down counter with a delay of 1sec(using timer0) and dsiplaying it on the terminal using serial port at the same time. When i implement only the led display it works but when i add the logic for hyperterminal display it doesnt. But the same terminal display logic is working in a program where no timer interrupt is (...)
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
Somewhere here at the EDABoard you will find (use SEARCH) a number of posts on how to generate 0.1s delay using 8051-compatible microcontroller and timer1 interrupt .. Then you can employ two registers (or variables) to create the 9990 * 0.1s loop .. Should work .. Rgds, IanP
Hi 8051 have 2 timers Set timer1 as counter to cont pulse of incoming (frequency to be measured) signal And set timer2 as 1 sec time base (signal must be with in microcontroller voltage levels) Reset timer1(counter) to 0 set it to start count , start timer2 for 1 sec (...)
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 :|
i suggest that you should switch to C compiler like Keil etc for programming of variety of controllers (PIC, 8051, AVR etc). the program structure will almost remain the same while final code will be generated by including respective controller library. the theme of your program is very simple. just write a code in C.
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 (...)
Hi....although i dont have much knowledge about PIC...use timer0 to generate a delay of requires some calcultion like...what is internal clock frequency of the mc...suppose it is 1us...then timer0 increments every 1us...timer overflows after 65536 counts ie (after create a delay of 50ms...(65536-50000): (...)
hi everybody.i hv a problem with my is a counter prgrm.i hv 2 calculate like 99,98.........00 bt it is giving o/p like 9(1st display),then it goes off n then 9 on 2nd display.m using ATMEL 89C51 controller n using keil code is #include sfr disp_val=0X90; sbit ds1=P2^0; sbit ds2=P2^1; void system_init(void); vo
If you want to learn assembly language for 8051 then refer mohammed ali mazidi textbook or go to where you get tutorials
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
Increase the delay and check it... For 8051 series if u use 8 MHz crystal... Write a delay fuction like, void delay(unsigned int time) { while(time--); } then in main function call delay(30000); Before making high and before making low.... This is approximately almost 1 sec delay... (...)
Download the delay calculator and generate the required delay. 8051 delay Calculator
Actually Mode 0 is a relic from the days of the 8048. 8051 Mode 0 History: 13-bit Time Mode (mode 0) timer mode "0" is a 13-bit timer. This is a relic that was kept around in the 8051 to maintain compatability with its predecesor, the 8048. Generally the 13-bit timer mode is not used in new (...)
hello everyone! i know that many has already posted posts on PWM control but i am still confused about the THING! What does PWM depend upon? i know that PWM is obtained when we have delay between input and output..but can't we that simply by: void pwm(unsigned char value) { out=0; delay(value) out=1; } :?: why do we have to use tim
Guys i m making a Scrolling text using 5x7 display with 8051 but i m having a problem that i m unable to figure out that how to scroll a text i wrote this test code but it keeps displaying 'A' .. plz can sumbody tell me what is the prob with this code...... i ll very thankful..... #include int count={0x08,0x10,0x20,0
You could use an external interrupt to start the timer in the AT89S51 to accomplish the task. However, with such as simple task, you may want to attach the output of the PIR to one of the port pins and constant poll (check) the pin status. When a change occurs you can the start one of the timers in the AT89S51 to implement the desired (...)
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
I have designed and written some code to display the recievers output on lcd but not getting the required output can anyone help me #include sbit rs = P1^1; sbit en = P1^2; sbit inter= P3^5; void time_delay(void); void convertanddisplay(unsigned char value); void lcd_init(void); void lcd_string(unsigned char *str); void lcd
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 (...)
hi 8-) i want to create a table to get acces to numbers after a 1s delay can anybody help with this code? cseg at 0h START: MOV TMOD,#01H ;timer0 IN MODE 1 MOV TH0,# 0CH MOV TL0,# 0A3H SETB TR0 ; ENABLE timer 0 MOV R2,#20 ADD A,#TABELA movC A,@A+PC delay:JNB (...)
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
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 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 (...)
// USE IT1 and IT2 if your keys give you 0 when pressed #include sbit led1=P1^0; sbit led2=P1^1; sbit led3=P1^2; sbit led4=P1^3; sbit key1=P3^2; // you need to place key at P3.2 & P3.3 as they are the External Int pins of 8051 ! sbit key2=P3^3; long count=0; void delay(
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 (...)
kindly metion a programme which will implement timer of 8051 microcontrollerin vhdl
i am currently studying on 8051 PWM and need to generate a PWM period of 2 sec and 80% duty cycle with the use of timer interrupt. However, when i run it it simply keep looping in the delay loop. Can anyone tell me what is wrong? Here is the code i use: #include ORG 0000H ; CLR F0