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

Fri Feb 05 2016, 02:03 PM
SANJYOT JADHAV
sir did we have to use Gsm modem for testing the circuit on proteus
Tue Feb 02 2016, 04:47 PM
upendra kumar
i want information about 3-phase motor control using gsm technology
Sat Jan 16 2016, 11:03 PM
Kenneth Etuk
Hi everyone, I need help with a project involving MCU,rttc, and DC motor. I will pay for it. please reply to my mail [email protected] if you are interested. thanks
ExperimenterUK
Sat Jan 16 2016, 07:38 AM
@Kabona Log in and create a thread. Tell us what you want to do
Wed Jan 13 2016, 01:54 AM
Kabona
how can I make my pc be input and output device for the microcontroller
Sat Jan 09 2016, 12:34 PM
Ravz
Thank u..... one more doubt Will ultrasonic sensor HC-SR04 works with aurdino board in operating system linux
Tommy.Kofisterix
Sat Jan 09 2016, 02:20 AM
I know it detects also the mud on rear bumper, this means other obstacles will
Tommy.Kofisterix
Sat Jan 09 2016, 02:18 AM
Hey hi, hello
Tue Jan 05 2016, 08:33 PM
Ravz
Anybody here????
Tue Jan 05 2016, 08:22 PM
Ravz
Will ultrasonic sensors detect obstacles when cloth or any other objects covers the sensor????

Downloads

Comments

designAAA
Sat Jan 30 2016, 08:49 AM
syavash_kasraeee
Sat Jan 16 2016, 05:54 AM
hamudi
Thu Jan 07 2016, 04:40 AM
Spandan89
Tue Jan 05 2016, 04:06 PM
siimao
Thu Dec 24 2015, 04:00 PM
moinabbasqureshi
Thu Dec 17 2015, 03:35 PM
dodo
Tue Dec 15 2015, 11:36 AM
embeddedashish
Thu Dec 10 2015, 12:50 PM

Online

Guests: 45, Members: 1 ...
jigneshdoshi viewing chatbox_menu.php

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

Members: 37727
Newest member: designAAA
Forum Activity
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu Feb 04 2016, 04:10 AM
Sir I didn't understand that. Could you explain ab...
sankalp_s Avatar
Posted By sankalp_s
Tue Feb 02 2016, 07:26 PM
but good use of sub routines will save a lot of ...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Feb 02 2016, 12:25 AM
after removing ALLON instruction it's working fine...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Feb 02 2016, 12:14 AM
Which micro controller are you using ?.Does it hav...
sankalp_s Avatar
Posted By sankalp_s
Sat Jan 30 2016, 07:40 PM
You need to explain exactly what you want the code...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sat Jan 30 2016, 06:57 PM
>sir can you code this in any other method?You nee...
sankalp_s Avatar
Posted By sankalp_s
Sat Jan 30 2016, 06:47 PM
CALL ALLONCLR L1CLR L2CLR L3CLR L4CALL DELAY ;del...
designAAA Avatar
Posted By designAAA
Sat Jan 30 2016, 10:03 AM
I have used to timer 2 external pin for other purp...
designAAA Avatar
Posted By designAAA
Sat Jan 30 2016, 09:00 AM
Hello,I am building the dotmatrix display, where I...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sat Jan 30 2016, 12:40 AM
ok sir but what is solution for it. will i have to...