Discussion in "8051 Discussion Forum" started by    SAMEET    Aug 29, 2009.
Sat Aug 29 2009, 10:48 AM
#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, 06: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, 11:14 AM
#3
my friend i wannna do it using timer interrupt and hope u give me program for that.
Sun Aug 30 2009, 03: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, 03: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, 07: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, 12:34 AM
#7
I didnt see any attachment here???????????????
Tue Sep 01 2009, 11:59 AM
#8
hiiiiiiiii this is program
Wed Sep 02 2009, 03:50 AM
#9
Where is it????????
Wed Sep 02 2009, 04: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, 08:05 AM ]

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

ketan.avpti
Thu Apr 24 2014, 02:30 AM
Nishant519
Thu Apr 24 2014, 01:40 AM
steve_yu_chan
Wed Apr 23 2014, 12:14 PM
dsk752dsk
Wed Apr 23 2014, 11:46 AM
gdeepkeyrun
Wed Apr 23 2014, 09:25 AM
oneblade
Mon Apr 21 2014, 01:59 PM
trevon22
Mon Apr 21 2014, 11:34 AM
quanyixin
Mon Apr 21 2014, 08:05 AM

Conversation

Wed Apr 23 2014, 02:57 AM
NAD
hi can someone help me write the code to interface an alphanumeric keypad to pic16f877A??!
Wed Apr 23 2014, 02:56 AM
NAD
hi,
kram.ram420
Mon Apr 21 2014, 09:27 AM
Hi.. Please help me to get through microcontrollers..
Sun Apr 20 2014, 05:23 AM
ARPAN
HELLO. I AM USING 8051 WITH RFID , PASSWORD AND FINGERPRINT.I HAVE SFM 3030 FINGERPRINT MODULE HOW TO INTERFACE IT WITH 8051? DIRECTLY OR EXTRA CIRCUITRY IS REQUIRED?AND HOW TO USE TWO SERIAL DEVICES RFID AND FINGERPRINT WITH ONE 8051?
ExperimenterUK
Thu Apr 17 2014, 01:23 PM
@mba Great .. please do.
Thu Apr 17 2014, 12:27 AM
mba'
like the forum and wish to participate
ExperimenterUK
Wed Apr 16 2014, 04:45 PM
@viniciusheidrun..you should read my comment just before your post
viniciusheidrun
Wed Apr 16 2014, 01:43 PM
I'm doing a drive system with SIM900D modem and microcontroller AT89S52 via sms. I'm having trouble can not generate the. Hex to send to the microcontroller, whenever I compile the error, I'm using MCU 8051 IDE, what should I do so that my system receive sms and perform my task?
ExperimenterUK
Mon Apr 14 2014, 01:00 PM
@Haranadh,bipin chandra etc. Create threads for your questions.
Sun Apr 13 2014, 04:05 AM
Haranadh
we bought HC 06 Bluetooth modem instead of Module ,Can any one help me of using it as bluetooth module since i am doing this project?
  Choose Skin