Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

leds blinking programme problem-8051

Status
Not open for further replies.

rohansinha2000

Member level 2
Joined
Jan 8, 2010
Messages
51
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,288
Location
KOLKATA
Activity points
1,678
leds programme problem

ORG 0000H ;System reset RST
AJMP start
ORG 0003H
MOV P1,#11111111B
JNB P3.7,$
MOV P1,#00000000B
RETI
ORG 0030H
start:
Setb P1.0
Clr P1.1
call delay;
Setb P1.1
Clr P1.2
call delay;
Setb P1.2
Clr P1.3
call delay;
Setb P1.3
Clr P1.0
call delay,
ljmp start;
delay:
XRL A,#0FFH ;IN CASE OF 2051 CIRCUIT
MOV P1,A
JNB P3.7,FULL
JB P3.6,$
JNB P3.7,FULL
JNB P3.6,$
JNB P3.7,FULL
RET
FULL: MOV P1,#11000000B
JNB P3.7,$
MOV P1,#11111111B
RET
END



why that is not working for me?
 

leds programme problem

It is difficult to understand from the assembly code to decide what it is expected to do and what it is not doing and giving problem.
 

Re: leds programme problem

did you apply proper signals to P3.6 and P3.7 .

otherwise monitor whether you get a cyclic bits in P1.

srizbf
14thmay2010
 

Re: leds programme problem

hi, your question is not understandable. explain it briefly.


regards
kj
 

Re: leds programme problem

i want to use ne 555 with at89c2051. to controlled the blinking rate by 555 timer. but my code is not working.
 

Re: leds programme problem

i deduce that you should apply the o/p of ne555 to
p3.7.

is it so ?

just saying "..i want to .." does not give full information.

give all details.
say, ne555 o/p is connected to port bit ...

am connecting leds to port bits...

srizbf
14thmay2010
 

Re: leds programme problem

yes i tried to add ne 555 in p3.7
and want to control speed of blinking by preset of 555.
 

Re: leds programme problem

dont use two threads. and explain your question briefly

regards
kj
 

Re: leds programme problem

if P3.7 alone is required , then testing P3.6 is not necessary .

in the org 0030 code ,
first enable P3.7 using IE register (Enable All). that is missing.

srizbf
15thmay2010
 

Re: leds programme problem

hi

just tell me why you are using the interrupt vector?
you had not enabled the interrupt
0003 vector for interrupt 0 ie external interrupt0
here you did not mentioned about the external interrupt
ie. you are not connecting any input to P3.2
if so there's no need of interrupt vector programming
now you are ex-oring the value of A with 0xFF
what's the initial value of A?

what i feel is that you are not doing any ground works before start writing the program,. first define the requirement, initialize everything to be used to a known state. then apply the mathematics. please try to post the schematics and also comment each line of the program
this will help other's to understand the problem fast

regards

ml
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top