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

Tue Mar 03 2015, 06:59 AM
candyyyy
Hi! Can i ask how do you connect the Vo contrast pin? Do i leave it open?
ExperimenterUK
Sun Mar 01 2015, 07:06 AM
@Anupam Biswas..post all you have done in the GSM forum
Sat Feb 28 2015, 02:51 PM
Anupam Biswas
I am doinga project on gsm based home automation.I have done alittle study about at commands.I am using Atmel 89c51 with yhe gsm module.I am unable to receive any message via the module.The simulation is done on proteus and i am using a virtual terminal.Can anyone please help me?Thanks in advance.
Tue Feb 24 2015, 12:47 AM
MrCurious
is Stat a global variable too? you reference it in Chan's "disk_status" function.
Sat Feb 21 2015, 09:10 PM
Harikumar
കൊള്ളാം
ExperimenterUK
Fri Feb 20 2015, 06:28 AM
@sugikz.. I have asked Ajay about it, he'll soon sort it out
Thu Feb 19 2015, 12:22 PM
sugikz
"Sorry no bots allowed! You entered two different email addresses. Please enter a valid email address in the two fields provided"
Thu Feb 19 2015, 12:21 PM
sugikz
this are the problem notice box;
Thu Feb 19 2015, 12:20 PM
sugikz
yes, i still got stuck on email problem, i've used gmail, yahoo, and told some friends of mine to sign up on the site, but they face the same problem as iam,
Thu Feb 19 2015, 05:48 AM
sjeeva
hi, is any doing a project on raspberry pi

Downloads

Comments

MALIKATIF
Mon Mar 02 2015, 04:47 PM
raamchandran
Mon Mar 02 2015, 11:20 AM
ABiDAEV
Sat Feb 28 2015, 11:31 PM
arunkollam
Wed Feb 25 2015, 05:28 AM
sugikz11
Wed Feb 25 2015, 04:23 AM
Buhari
Sun Feb 22 2015, 03:16 PM
Jarvis_v3
Sat Feb 21 2015, 02:00 AM
Sontoloyo
Thu Feb 19 2015, 12:50 PM

Online

Guests: 46, Members: 0 ...

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

Members: 37591
Newest member: MALIKATIF
Forum Activity
ABiDAEV Avatar
Posted By ABiDAEV
Sun Mar 01 2015, 11:42 AM
Thanks for sharing, but can you please update the ...
sankalp_s Avatar
Posted By sankalp_s
Thu Feb 26 2015, 09:27 PM
What are you trying to make ?ExperimenterUKsir i w...
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu Feb 26 2015, 12:58 AM
We seem to be moving away from the original projec...
ajay_bhargav Avatar
Posted By ajay_bhargav
Wed Feb 25 2015, 02:02 PM
You will need a 64 bytes buffer that will be writt...
PsySc0rpi0n Avatar
Posted By PsySc0rpi0n
Wed Feb 25 2015, 09:24 AM
I've already read that tutorial and almost all oth...
ajay_bhargav Avatar
Posted By ajay_bhargav
Wed Feb 25 2015, 04:56 AM
brightness control is going to be tough job as you...
ajay_bhargav Avatar
Posted By ajay_bhargav
Wed Feb 25 2015, 04:36 AM
I've already read that tutorial and almost all oth...
sankalp_s Avatar
Posted By sankalp_s
Tue Feb 24 2015, 07:18 PM
The attached code is for up to 16 LEDs.Just point ...
sankalp_s Avatar
Posted By sankalp_s
Tue Feb 24 2015, 07:16 PM
sankalp_s Avatar
Posted By sankalp_s
Tue Feb 24 2015, 07:12 PM