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 Nov 29 2016, 02:49 PM
jaykumar
Dear sir, elevator microprocessor control , the vendor locked the control, pls help me how can we decode the password
Sat Nov 26 2016, 10:24 AM
manikanta B
hello i know about gsm,gps and zigbee but i dont know how to use them while programming. can anyone suggest me how to use them
ExperimenterUK
Sat Nov 19 2016, 07:09 PM
@Protaz.. Really you would be better off asking on one of the many Arduino user sites
Fri Nov 18 2016, 05:39 AM
Protaz
Hi, am new in programing, but I have few skills in electronic. I want to make an automatic timing system for institutions using arduino uno. Any one to assist me how to program the microcontoller?
Tue Nov 15 2016, 04:45 AM
Hemangi patel
hello, i am working on atmega128 board and i want to interface with sd card with using fat32 file system. i am totaly new in this field .so pls anyone can u suggest me some imp links.thanks
Thu Nov 10 2016, 01:40 PM
ajith raj
hi frds i make voice control robot using blutooth module
Wed Oct 26 2016, 08:23 AM
ishalt
is it possible to completly get the robot running from java code
Sun Oct 23 2016, 05:50 PM
mamata thakur
plz send full mini project report for ic 741&ic 555 tester
Wed Oct 19 2016, 03:30 PM
riddhi1296
can you provide an explanation for the inverter 8051 code and how it works
ExperimenterUK
Sat Oct 15 2016, 12:15 AM
@snaya. Create a thread in the 8051 forum for your questions

Downloads

Comments

[email protected]
Thu Dec 08 2016, 11:02 AM
Jonathan.kei
Mon Nov 21 2016, 04:30 PM
AVRuser1
Sun Nov 20 2016, 06:07 PM
JaguarPaw
Thu Nov 17 2016, 07:44 PM
PeterJohn
Mon Nov 14 2016, 05:54 PM
evigna
Wed Nov 02 2016, 02:03 PM
ozancakiroglu
Thu Oct 27 2016, 01:54 PM
[email protected]
Fri Oct 21 2016, 10:35 PM
Forum Activity
Centurio Avatar
Posted By Centurio
Mon Nov 28 2016, 08:46 AM
Hi there,long time ago... i've a short question to...
kirangowle Avatar
Posted By kirangowle
Wed Nov 16 2016, 03:56 PM
Hello Forum members,After a long time i am back to...
Pratik_Suthar Avatar
Posted By Pratik_Suthar
Thu Oct 13 2016, 12:39 PM
@martin the HEX file provided in the project is no...
ajay_bhargav Avatar
Posted By ajay_bhargav
Thu Oct 06 2016, 06:15 AM
Hi Phil, Do you want to add this to existing proje...
ajay_bhargav Avatar
Posted By ajay_bhargav
Thu Oct 06 2016, 06:13 AM
CE should be high when you go for reading mode/wai...
ajay_bhargav Avatar
Posted By ajay_bhargav
Thu Oct 06 2016, 06:03 AM
You can also use ESP8266 with its SDK to write app...
ExperimenterUK Avatar
Posted By ExperimenterUK
Mon Oct 03 2016, 11:15 PM
This is an old thread and the links no longer work...
martinsnc115877 Avatar
Posted By martinsnc115877
Wed Sep 14 2016, 12:51 PM
sir, i did your led scrolling mass display, and it...
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Sep 09 2016, 11:45 PM
The Hex file for this project is a bit too big for...