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.

8051 based leds blinking with external blinking speed contro

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
hi sir;
am newer in 8051 family. am now using only assembly language for programming purpose. i want to blink leds with external speed controlled is it possible. what is the code for it.
 

Re: 8051 based leds blinking with external blinking speed co

You can achieve this by having two buttons, one to increase the speed and the other to lower it

The code you will have to do is:

- Set a maximum and minimum speed
- Start with a default blinking speed, it could be max or min
- Blink the LEDs in a loop
- Inside the loop check if the buttons have been pressed
- Make sure to debounce the buttons reading
- If the button to increase the speed has been pressed, decrease the delay between blinks
- If the button to decrease the speed has been pressed, increase the delay between blinks
- When increasing or decreasing the delay, make sure to check against the max and min value.

Now you have homework, get to work in your code.
 

If you need specific details and code in addition to the explaination given by daviddlc I can send. (I have it somewhere from a project done by one of my students, that has to be searched).
 

u have already put this question few days before and i think your problem is resolved. chek it
 

Re: 8051 based leds blinking with external blinking speed co

hi,
ark5230 plz send it for me. my mail id is rohansinha2000@gmail.com
and thanks every all for reply

Added after 6 minutes:

i use fixed delay
example: ljmp start;
delay: mov R1,#0FFH
del1: mov R2,#0FFH
del2: djnz R2,del2
djnz R1,del1
ret
end

but i need variable delay by ne 555 timer to add in specific port.and i shall able to controlled blinking speed by preset variable resistance.
so what is the code for it to add 555 to increase decrease speed of blinking.
 

Re: 8051 based leds blinking with external blinking speed co

hi roshan i have a project called multi design led with with speed control and design select. check my site www.free8051projects.blogspot.com to get code and circuit diagram. you can easily moduify my code for ur requirements also check this project led brightness control with remote.

regards
kj
 

Re: 8051 based leds blinking with external blinking speed co

hi your zip or password is incorrect in your blog

Added after 2 hours 15 minutes:

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.1,$
JNB P3.7,FULL
JNB P3.1,$
JNB P3.7,FULL
RET
FULL: MOV P1,#11000000B
JNB P3.7,$
MOV P1,#11111111B
RET
END

i tried that is not working for me why?
 

Re: 8051 based leds blinking with external blinking speed co

hi rohan, you didnt under stand the basics. refer 8051 by mazidi book. you have to use your timer as counter. u didnt initialise your counter. refer my code and diagram i am attaching it here.
 

Re: 8051 based leds blinking with external blinking speed co

ya i now understand. can u send me the dimmer programe in my mail id. bkz in your site the zip was corrupted.
 

Re: 8051 based leds blinking with external blinking speed co

this same program is also posted in another thread
"leds programme problem"
by the same forum member.

he gets replies in both the thread but
information that he gives here is partial and somewhat different from the other.

dont know which is required by the member?


srizbf
14thmay2010
 

Re: 8051 based leds blinking with external blinking speed co

i want to know is my code is perfect?
i added ne 555 to p3.7
 

Re: 8051 based leds blinking with external blinking speed co

your code is wrong, under stand the basics first.

attached the pwm based LED dimmer project.

regards
kj
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top