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

Thu Aug 27 2015, 10:06 PM
1
-1'
Thu Aug 27 2015, 10:05 PM
1
1
Thu Aug 27 2015, 10:03 AM
Nilesh Thakre
anybody please help me ,i face problem reading a message and identify the string of read message (8051 uc with sim300 gsm modem i have use)
ajay_bhargav
Thu Aug 27 2015, 07:17 AM
@KRIZZA, make the circuit, and load hex file you're done.
Thu Aug 27 2015, 03:39 AM
sk nawal
arm control ckt
Mon Aug 24 2015, 02:11 AM
KRIZZA
@ExperimenterUK BUILD PROJECT LIKE THIS
gkn06
Thu Aug 20 2015, 03:17 AM
hello anybody please
Wed Aug 19 2015, 09:48 AM
Kiruba
I am new to ARM Development..I need help
Tue Aug 18 2015, 09:34 AM
mairja naser
pic30f2010 ic usb copy
ExperimenterUK
Mon Aug 17 2015, 10:32 PM
@krizza build what ?

Downloads

Comments

syahaikas102
Wed Aug 26 2015, 02:03 PM
iscode
Fri Aug 21 2015, 11:19 PM
JunkmanXL
Thu Aug 20 2015, 11:55 AM
pari@3120
Thu Aug 20 2015, 07:07 AM
gkn06
Wed Aug 19 2015, 09:50 AM
mopatihanuman
Tue Aug 18 2015, 12:47 PM
gebrish
Thu Aug 13 2015, 08:26 AM
casha
Fri Aug 07 2015, 07:42 AM

Online

Guests: 43, Members: 0 ...

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

Members: 37687
Newest member: syahaikas102
Forum Activity
pravin_35 Avatar
Posted By pravin_35
Sat Aug 29 2015, 08:25 AM
Hi every one ,I need a help how to compare the Usa...
gkn06 Avatar
Posted By gkn06
Thu Aug 27 2015, 02:52 PM
ok! to start with which IDE or compiler you're pla...
ajay_bhargav Avatar
Posted By ajay_bhargav
Thu Aug 27 2015, 07:05 AM
ok! to start with which IDE or compiler you're pla...
abdul991 Avatar
Posted By abdul991
Sat Aug 22 2015, 06:07 PM
1. Its a pratical task...2. SNMP manager is implem...
gkn06 Avatar
Posted By gkn06
Wed Aug 19 2015, 10:18 AM
My project is to interface several serial interfac...
ExperimenterUK Avatar
Posted By ExperimenterUK
Mon Aug 17 2015, 10:13 PM
Let me start by saying that I have no experience w...
abdul991 Avatar
Posted By abdul991
Thu Aug 13 2015, 12:33 PM
Hi all.... I'm trying to implement a Atmega2560 as...
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu Jul 23 2015, 08:14 PM
Try this link.Basically find the tacho output pin...
seoulmak Avatar
Posted By seoulmak
Mon Jul 20 2015, 03:44 PM
ajay_bhargav Avatar
Posted By ajay_bhargav
Mon Jul 20 2015, 04:42 AM
Ok then, check if you did not mention "LCD_ClearSc...