Discussion in "8051 Discussion Forum" started by    SAMEET    Aug 29, 2009.
Sat Aug 29 2009, 02:48 PM
#1
i require code for 5 sec delay using timer interrupt 0 in 16-bit mode in assembly language for 89s51.
Sun Aug 30 2009, 10:44 AM
#2
well i explained many times..

create 50ms timer and then use a counter to count 100. coz 100*50 = 5000ms = 5sec
Sun Aug 30 2009, 03:14 PM
#3
my friend i wannna do it using timer interrupt and hope u give me program for that.
Sun Aug 30 2009, 07:42 PM
#4
Well i cant give your a program, but you can do that in interrupt.. just add the counter logic in interrupt routine.

write something yourself, i will rectify it incase of any errors. unless you try you wont learn.
Mon Aug 31 2009, 07:33 AM
#5
Let me explain you the steps to perform Timer interrupt0:-
----------------------------------------------------------------------
1. Enter "IE" reg. value to initialize the timer0 interrupt.
2. Enter the "TMOD" reg. value to select the timer0 with 16-bit mode.
3.Enter the values at "TH0 & TL0" as per the time delay you requested.
ex:-If 12MHz XTAL connected means, the constant time delay taken between each count is 1µsec. Else if 24MHz XTAL means, then 0.5µsec is the constant time delay.
4. Start the timer0.
5. Write the ISR program under the pre-defined Timer interrupt 0 address.
Mon Aug 31 2009, 11:33 AM
#6
MR GOPI AND AJAY

I AM SENDING U MY PROGRAM USING ADC 0804 HERE I AM DISPLAYING 336V WITH THREE 7 SEGMENT DISPLAY.

SO WHEN I MAKE MY MACHINE ON DURING CAPACITOR TAKES 3 SECONDS TO CHARGE UPTO 336V
SO I NEED TO PUT DELAY FOR 5 SEC TO ALLOW NOT TO GET OL ERROR AROUND 220V TO 200V WHEN I PROVIDE SUPPLY. FOR FIRST TIME U WILL BE ABLE TO GET IT AND I WANNA USE TIMER INTERRUPT TO CHECK OL VOLTAGE AFTER EVERY 5 SEC. I AM ATTACHING MY PROGRAM WITH THE HELP OF TIMER VERIFY WHETHER I AM CORRECT.
Tue Sep 01 2009, 04:34 AM
#7
I didnt see any attachment here???????????????
Tue Sep 01 2009, 03:59 PM
#8
hiiiiiiiii this is program
Wed Sep 02 2009, 07:50 AM
#9
Where is it????????
Wed Sep 02 2009, 08:04 AM
#10
Ok Buddy. I am sending one reference code where a set of leds connected to PORT1 has to be blinked for every 1sec using timer0 interrupt with 16-bit mode. The XTAL used is 11.0592.

                     temp data 40h
                     cnt    data 00h

                      org 00h
                      ljmp main

                      org 0bh
                      clr tr0
                      djnz cnt,down
                      mov cnt,#14
                      mov a,temp
                      cpl a
                      mov temp,a
                      mov P1,temp
                      mov th0,#0
                      mov tl0,#0
down:            setb tr0
                      reti

main:             mov cnt,#14
                     mov temp,#55h
                      mov tmod,#01h
                      mov th0,#0
                      mov tl0,#0
                      mov ie,#82h
                      setb tr0
                      sjmp $


[ Edited Wed Sep 02 2009, 12:05 PM ]

Get Social

Information

Powered by e107 Forum System

Conversation

ExperimenterUK
Thu Oct 30 2014, 06:02 PM
This is a chat box..create a thread if you need help...but we don't do homework
Tue Oct 28 2014, 07:33 PM
vinni
hi rickey...anyone got the pgm...pls gimme now
Tue Oct 28 2014, 06:35 PM
potla
hi vinni even i need that program. help me if you get it
Tue Oct 28 2014, 03:22 PM
vinni
1. Using a look-up table in Flash ROM and accumulator offset indexed addressing mode, write a program that acts as a timer. The timer should count from 0 to 59 seconds. After reaching 59, it should go back to 0 on the next second and continue to count up. The timer should use the seven-segment display. The look-up table should contain information on how to display the digits 0 – 9 on the seven-segment display
Tue Oct 28 2014, 03:22 PM
vinni
hello Rickey..i need this pgm very urgently
Tue Oct 28 2014, 01:42 AM
Boy Donald
Dear sir, thanks before. i have some project urgent for my school and my project need this digital countdown timer using 7 segmen display. but your project only show ten minutes countdown, i need your help, can you show me more to change the minute or set the time manually. thank you, sorry for disturbing you.
Tue Oct 28 2014, 01:32 AM
Boy Donald
dear sir
Tue Oct 28 2014, 01:19 AM
Boy Donald
Rickey you inspired me a lot but why i can not change the time ( minute
Sun Oct 26 2014, 02:51 AM
sandeep bankar
dear sir I m facing problem about..how to read number of incoming call in gsm 900 a. pls help how to read it in atmel avr microcontroller.
ajay_bhargav
Mon Oct 20 2014, 11:22 AM
@skrishna, please post in forum so we can help you better.

Downloads

Comments

prash5054
Thu Oct 30 2014, 06:34 AM
Max.otto
Mon Oct 27 2014, 01:23 PM
toypoy
Sun Oct 26 2014, 01:06 AM
hiswe
Thu Oct 23 2014, 04:18 PM
pddung93
Sun Oct 19 2014, 01:56 PM
msideal
Thu Oct 16 2014, 08:48 AM
robotgirl
Tue Oct 14 2014, 06:23 PM
BRV64
Mon Oct 13 2014, 05:48 AM

Online

Guests: 44, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 37535
Newest member: prash5054
Forum Activity
rkodaganur Avatar
Posted By rkodaganur
Fri Oct 31 2014, 01:44 AM
Hi Ajay, I wanted to know can we use transformer ...
Max.otto Avatar
Posted By Max.otto
Thu Oct 30 2014, 11:09 AM
Hello all, before generating i have to give PWM p...
prash5054 Avatar
Posted By prash5054
Thu Oct 30 2014, 06:40 AM
can u post the updated code for the above problem ...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Oct 29 2014, 05:36 PM
Thank you for the feedback.It's good to hear when ...
msideal Avatar
Posted By msideal
Tue Oct 28 2014, 05:34 PM
ExperimenterUK: Thankyou so much for helping me......
msideal Avatar
Posted By msideal
Tue Oct 28 2014, 05:18 PM
thanks ExperimenterUK for your help.... I will try...
ExperimenterUK Avatar
Posted By ExperimenterUK
Mon Oct 27 2014, 10:29 PM
Your error seems to be the use of PINC, which is f...
msideal Avatar
Posted By msideal
Mon Oct 27 2014, 05:45 PM
i want to extend my i/o's by writing this code. i ...
Max.otto Avatar
Posted By Max.otto
Mon Oct 27 2014, 01:30 PM
Hi all , i am working with PSoC 5LP. I have contin...
gaurav7577 Avatar
Posted By gaurav7577
Mon Oct 27 2014, 09:53 AM
hello everyone i wanna interface blood pressure se...