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

Wed Nov 08 2017, 07:05 PM
Anirudh jain
I want to burn code in atmel 89s51 24pc 0329 but cannot get the connection with the burner. Can somebody provide me with the circuit diagram for connecting controller to burner. I'm using usb burner
Thu Nov 02 2017, 05:14 PM
karpal
write a program to exchange the content of b register with external RAM address 02CFH help me
Wed Nov 01 2017, 11:17 PM
sanae
i am using the DHT11 but i'm getting some errors in the simulate the programe in proteus 8 professional,: 1)cannot find model file 'DHTXX.MDF'.2)simulation failed due to netlist linker error(s).
Fri Sep 29 2017, 08:15 AM
Maaz
i am doing the same project on verilog please contact me [email protected]
Wed Sep 20 2017, 06:06 AM
Ted
In a missing pulse detector using a 555 timer connected as a monostable vibrator with a PNP transistor,how does the positve input pulse turn on the PNP transistor?
Sun Sep 03 2017, 07:59 PM
martymarty
How do I connect an <NOKIA 1100 LCD > to an atmega328P ?
poojab51296
Sun Aug 20 2017, 03:53 PM
i am intending to interface sd card with STM32F4 and want to write a file in sd card using SPI protocol but using HAL only. Can anyone help me PLEASE!!!!
poojab51296
Sun Aug 20 2017, 03:52 PM
hello
rawat742
Fri Aug 18 2017, 05:07 PM
hi @ angel patel i will attach a file i hope it will be helpfull for you
ExperimenterUK
Tue Aug 15 2017, 03:27 AM
@ angel patel... just log in and post your problem

Downloads

Comments

Wed Nov 15 2017, 10:46 AM
Ansh12
Sat Nov 11 2017, 03:43 AM
AngelGT93
Fri Nov 10 2017, 06:53 AM
JardCrocker
Wed Nov 08 2017, 05:27 PM
vivitern
Tue Nov 07 2017, 09:08 AM
catrons
Sat Nov 04 2017, 10:46 PM
JFTech
Fri Nov 03 2017, 05:58 AM
Sindhuspoo
Wed Nov 01 2017, 04:32 AM

Online

Guests: 71, Members: 0 ...

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

Members: 37916
Newest member: [email protected]
Forum Activity
Ansh12 Avatar
Posted By Ansh12
Fri Nov 17 2017, 04:07 AM
I am looking keypad interfacing program. I was rea...
JardCrocker Avatar
Posted By JardCrocker
Wed Nov 08 2017, 05:29 PM
Hi...i am a new user here. I was also facing the s...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Nov 07 2017, 07:13 PM
> It employs a fairly advanced technique to detect...
vivitern Avatar
Posted By vivitern
Tue Nov 07 2017, 09:33 AM
I own a used Clavia ddrum4 SE drum module. It empl...
bvdb Avatar
Posted By bvdb
Wed Oct 18 2017, 01:50 AM
I purchased the RKitL51 8051 C compiler from Raiso...
ExperimenterUK Avatar
Posted By ExperimenterUK
Mon Oct 16 2017, 11:44 PM
That looks complicated.Is 8051_BLK a standard 80...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sun Oct 15 2017, 07:29 PM
According to this, gmail should support POP3.https...
Help Avatar
Posted By Help
Sun Oct 15 2017, 03:21 AM
AT+POP3READ=? +POP3READ: (1-1460) OK AT+POP3READ=...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sat Oct 14 2017, 08:06 PM
What happens if you ask for the full email ieAT+PO...
Help Avatar
Posted By Help
Sat Oct 14 2017, 02:28 AM
Dear all, AT // OK // 3.1 Bearer profile // Conf...