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
Forum Activity
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Jul 29 2014, 02:08 PM
Remove all power connections to the circuit at the...
pravin_35 Avatar
Posted By pravin_35
Tue Jul 29 2014, 06:00 AM
Fyiimage with connections
pravin_35 Avatar
Posted By pravin_35
Tue Jul 29 2014, 05:53 AM
another chip is also same problem... i am confused...
pravin_35 Avatar
Posted By pravin_35
Tue Jul 29 2014, 01:41 AM
hi guys i found the following link is very useful...
ExperimenterUK Avatar
Posted By ExperimenterUK
Mon Jul 28 2014, 11:17 PM
Link the tx and rx pins on HC06, everything you se...
ExperimenterUK Avatar
Posted By ExperimenterUK
Mon Jul 28 2014, 11:13 PM
another chip is also same problem... i am confused...
pravin_35 Avatar
Posted By pravin_35
Mon Jul 28 2014, 01:33 PM
I suggest you to try with another chip of same and...
pravin_35 Avatar
Posted By pravin_35
Mon Jul 28 2014, 05:29 AM
I suggest you to try with another chip of same and...
ajay_bhargav Avatar
Posted By ajay_bhargav
Mon Jul 28 2014, 03:23 AM
I suggest you to try with another chip of same and...
pravin_35 Avatar
Posted By pravin_35
Mon Jul 28 2014, 03:11 AM
just now tried with Mplabx screen shotpravin_35Are...

Conversation

ajay_bhargav
Mon Jul 28 2014, 12:34 AM
@ Anshu Raj sorry we do not take such requests.
Sun Jul 27 2014, 12:23 AM
Anshu Raj
sir plz send the automatic collage alram bells in 2 hrs bells ring. For microcontroller programme plz sir
ajay_bhargav
Thu Jul 24 2014, 01:06 AM
@R.ABHISHEK where? I dont see it. is it in forum?
Wed Jul 23 2014, 05:49 AM
R.ABHISHEK
sir,pls message on microcontroller 8051 assambly language new program
Wed Jul 23 2014, 05:47 AM
R.ABHISHEK
sir,pls message on 8051 microcontroller assambly language program new quastions
ajay_bhargav
Tue Jul 22 2014, 09:18 AM
@Pragya Android application is taken from google play. Only Author has its source with him. Application is only used in this project.
Tue Jul 22 2014, 04:58 AM
Pragya
plz send me 8051 code and android code for android based device controller via Bluetooth .Here in this project I am using Hc-06 Bluetooth module
Thu Jul 10 2014, 09:57 AM
Caleb
plz someone mail me the source code for that project
Thu Jul 10 2014, 09:57 AM
Caleb
http://www.8051projects.net/download-d188-control-your-pc-tv-remote.html
ExperimenterUK
Tue Jul 08 2014, 03:25 PM
Post questions in the forum.. this area is for chat

Downloads

Comments

kritz22
Mon Jul 28 2014, 10:33 AM
Abbasans786
Mon Jul 28 2014, 03:15 AM
Imran.pk
Fri Jul 25 2014, 07:50 PM
PavanKh
Fri Jul 25 2014, 12:56 AM
vinosentinal
Mon Jul 21 2014, 08:28 PM
niks_here
Sun Jul 20 2014, 05:38 PM
athiramsankar
Sun Jul 20 2014, 12:00 PM
salemalqahtani
Sun Jul 20 2014, 12:55 AM

Online

Guests: 39, Members: 0 ...

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

Members: 37483
Newest member: kritz22