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 Aug 30 2016, 05:03 PM
Kinzang
hello sir, can i know more in detail about the football substitution board project.
Tue Aug 30 2016, 06:06 AM
bhagyashri buddhewad
my project is automatic room light controller using visitor counter so i want coding in keil and circuit diagram can tell me and i want to use uc at89c51 thanks you
ExperimenterUK
Sun Aug 28 2016, 08:32 PM
Which project ?
Sun Aug 28 2016, 05:21 AM
Dipankar Baishya
Hi sir.... I want do this project but I have not this sercuit diagram..... can you give me full details and diagram...... Thank you
Sat Aug 27 2016, 11:32 AM
pankaj kumar
view coding zig zag motion source in html
ExperimenterUK
Fri Aug 26 2016, 05:11 PM
@jaithra post in the 8051 forum. ADCs aren't usually RS232/serial
Fri Aug 26 2016, 04:58 PM
jaithra
sir ,i would please like to have circuit for interfacing 8051(AT89C51) with lLCD 8 bit ,ADC, and Gsm module through RS232 .. along with a buffer ... iam askinh this bcos i found that while interfacing RXD n TXD of 8051 is needed for both ADC and GSm ..cpuld u please help me to layout the circuit please ...
Wed Aug 24 2016, 11:00 PM
Goodnews
pls i need a project writeup on LED scrolling message display using microcontroller
Mon Aug 01 2016, 03:25 PM
Manu Mishra
hi guys if u need c code for SD card interfacing with p89v51rd2 8051 controller system u can see the video of the project and the download the c code form blog http://embeddedinrajasthan.blogspot.in/?view=classic
Mon Aug 01 2016, 03:23 PM
Manu Mishra
hi guys if u need c code for finger print security system u can see the video of the project and the download the c code form blog http://embeddedinrajasthan.blogspot.in/?view=classic

Downloads

Comments

martinsnc115877
Sat Aug 20 2016, 01:44 PM
rajavarmanslr
Thu Aug 18 2016, 12:24 PM
mariahcarey
Sat Aug 06 2016, 11:38 AM
dann11
Thu Jul 28 2016, 09:43 PM
adithyapaip
Thu Jul 21 2016, 05:45 PM
celu
Thu Jul 21 2016, 05:27 PM
Aiko
Wed Jul 20 2016, 01:51 PM
JorgeG
Sat Jul 16 2016, 07:19 PM

Online

Guests: 22, Members: 0 ...

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

Members: 37779
Newest member: martinsnc115877
Forum Activity
rajavarmanslr Avatar
Posted By rajavarmanslr
Thu Aug 18 2016, 01:40 PM
I have two 8051 that interfaces with nRF24l01. One...
rajavarmanslr Avatar
Posted By rajavarmanslr
Thu Aug 18 2016, 12:31 PM
I have two 8051 that interfaces with nRF24l01. One...
ExperimenterUK Avatar
Posted By ExperimenterUK
Mon Aug 01 2016, 05:26 AM
is working nowugoo5000Great, thanks for letting u...
ugoo5000 Avatar
Posted By ugoo5000
Sat Jul 30 2016, 07:31 AM
is working noworg 00hmov p1,#11111111bmov p3,#1111...
ugoo5000 Avatar
Posted By ugoo5000
Sat Jul 30 2016, 06:40 AM
when i press a button in p3.0,the counter will st...
ugoo5000 Avatar
Posted By ugoo5000
Sat Jul 30 2016, 06:30 AM
proteus file Attachment ...
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Jul 29 2016, 11:34 PM
Your code does not count at all, it produces a one...
ugoo5000 Avatar
Posted By ugoo5000
Fri Jul 29 2016, 07:49 PM
i want the the counter to be counting in secs with...
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Jul 29 2016, 07:31 PM
HiYour Proteus file did not upload, be sure to zip...
ugoo5000 Avatar
Posted By ugoo5000
Fri Jul 29 2016, 11:50 AM
below is the proteus file