Discussion in "New Ideas regarding projects" started by    ugoo5000    Jul 29, 2016.
Fri Jul 29 2016, 11:48 AM
#1
i am working on a project to generate a continuous pulse of 1 second on p1.2 when p3.0 is depress to ground. but is not working ,pls i need help
below is my code

org 00h
mov p1,#11111111b
mov p3,#11111111b
start:
mov p1,#11111111b
mov p3,#11111111b

start1:
jnb p3.0,count
jmp start1


count:
setb p1.2
clr p1.2
call delay
setb p1.2
jmp start1



delay: ;DELAY OF ONE SECOND
MOV TMOD,#01H
MOV TH0,#3CH
MOV TL0,#0B0H
MOV R7,#00H
SETB TR0
DEL:JNB TF0,DEL
MOV TH0,#3CH
MOV TL0,#0B0H
CLR TF0
INC R7
CJNE R7,#14H,DEL
ret

end
Fri Jul 29 2016, 11:50 AM
#2
below is the proteus file
Fri Jul 29 2016, 07:31 PM
#3
Hi
Your Proteus file did not upload, be sure to zip it before attaching.

Your code is okay.
Are you able to program your 8051 to do a simple LED flash ?.
Fri Jul 29 2016, 07:49 PM
#4
i want the the counter to be counting in secs with the real time clock but is a second late to compare with real time clock, i mean the proteus time, stimulate it and see


[ Edited Fri Jul 29 2016, 07:52 PM ]
Fri Jul 29 2016, 11:34 PM
#5
Your code does not count at all, it produces a one-shot, low pulse for each button press.
Can you zip and post your Proteus project.
Sat Jul 30 2016, 06:30 AM
#6
proteus file
Attachment
Sat Jul 30 2016, 06:40 AM
#7
when i press a button in p3.0,the counter will start to count but my problem is that the counter is not counting in real time in second with real clock the ,how can i make the clock delay to produce pulses in a second? is like the upper and the lower pulse in my signal is delayed a second making a complete cycle 2seconds,i tried to divide the pulse by 500ms so that i can get the total pulse to be 1sec but i cant generate a delay for 500ms, pls can you help me out


[ Edited Sat Jul 30 2016, 06:41 AM ]
Sat Jul 30 2016, 07:31 AM
#8
is working now
org 00h
mov p1,#11111111b
mov p3,#11111111b

start1:
jnb p3.0,count
jmp start1


count:
setb p1.2
call delay
clr p1.2
call delay
jmp start1



delay: ;DELAY OF 500ms
MOV TMOD,#01H; delay for 50ms
MOV TH0,#3CH
MOV TL0,#0B0H
MOV R7,#00H
SETB TR0
DEL:JNB TF0,DEL
MOV TH0,#3CH
MOV TL0,#0B0H
CLR TF0
INC R7
CJNE R7,#10d,DEL; 10*50ms=500ms
RET
end
Mon Aug 01 2016, 05:26 AM
#9


is working now

ugoo5000


Great, thanks for letting us know.

Get Social

Information

Powered by e107 Forum System

Conversation

Mon Jan 16 2017, 03:15 PM
Rutuja
How can we read notepad file using random acess file
Fri Jan 06 2017, 06:18 AM
muhammad Umar
i need cd4047 library file for protious please help me i s
ExperimenterUK
Wed Jan 04 2017, 09:01 PM
@Emin what is your site user name ?
Tue Jan 03 2017, 11:16 PM
Emin
Emin: I'm already a member since 2012 and entered repeatedly during period. But now it is impossible and obtaining a new registration is also failed. The same error message specifying that two e-mails i entered are different!. In fact thaey are the same. Now, what will be happen, what is your solution? Thanks..
Tue Jan 03 2017, 11:15 PM
Emin
I'm already a member since 2012 and entered repeatedly during period. But now it is impossible and obtaining a new registration is also failed. The same error message specifying that two e-mails i entered are different!. In fact thaey are the same. Now, what will be happen, what is your solution? Thanks..
Sun Jan 01 2017, 03:14 PM
Manoranjana Chary
Write an embedded program of increment and decrement in LCD connected to two keys of int1 and int0. Can u please send me the code for this as fast as possible because i need to submit it in college kindly
ExperimenterUK
Sat Dec 31 2016, 06:28 PM
Happy New Year everyone
ExperimenterUK
Sat Dec 31 2016, 06:27 PM
Please post questions in the forum, the chat box is for chat
Thu Dec 29 2016, 07:47 AM
drashti ranolia
can anyone help me for the microcontroller 8051 programming code for street lights that glow on vehicle movement using IR sensors ?
Tue Dec 27 2016, 11:45 AM
Shubhangi
Do we have to write lookup table for d6t thermal sensor?

Downloads

Comments

sarfrosh92
Sun Jan 15 2017, 09:18 AM
Deepakvaishu
Wed Jan 11 2017, 10:25 AM
rana_jee773
Sat Dec 10 2016, 11:22 AM
[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

Online

Guests: 34, Members: 0 ...

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

Members: 37796
Newest member: sarfrosh92
Forum Activity
Deepakvaishu Avatar
Posted By Deepakvaishu
Mon Jan 16 2017, 08:31 AM
you are right ..I should not include '\' at t...
Deepakvaishu Avatar
Posted By Deepakvaishu
Mon Jan 16 2017, 06:07 AM
No ,its not the null character, its just the '...
sankalp_s Avatar
Posted By sankalp_s
Sun Jan 15 2017, 07:55 PM
There is a fault in your Proteus design.If you loo...
sarfrosh92 Avatar
Posted By sarfrosh92
Sun Jan 15 2017, 10:04 AM
The 8051 Microcontroller (3rd Edition) by I. Scott...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sat Jan 14 2017, 11:59 PM
The site editor may have removed the 0 from \0.Actually it should not be needed, sochar *phone_no[3 ]={"1234567890" ," 9087654321" ,"76676667676"}; //array of pointers should work.
ExperimenterUK Avatar
Posted By ExperimenterUK
Sat Jan 14 2017, 11:54 PM
There is a fault in your Proteus design.If you loo...
sankalp_s Avatar
Posted By sankalp_s
Fri Jan 13 2017, 06:52 PM
Hi phill sir.. testButton1: ...
Deepakvaishu Avatar
Posted By Deepakvaishu
Fri Jan 13 2017, 11:58 AM
suppose i have this arraychar *phone_no[3 ]={"1234...
ajay_bhargav Avatar
Posted By ajay_bhargav
Fri Jan 13 2017, 05:59 AM
You need to send AT command one by one to all the ...
Deepakvaishu Avatar
Posted By Deepakvaishu
Wed Jan 11 2017, 10:47 AM
How to send the same message to multiple contacts ...