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.

I need to correct my 8051 ALP

Status
Not open for further replies.

dona700

Newbie level 3
Joined
Dec 22, 2010
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,303
can i use this code
org 0000h;power up
main:
mov P0_0,1;turn on the light
call delay
mov P0_0,0;turn off the light
call delay
jmp main

delay:
mov a,0
delay1:
push a
mov a,50
djnz a,delay1
pop a
djnz a,delay
ret
end

in MIDE. cuz a have i simple project using microcontroller 8051 but i dont know how can i change a time of red and green lights
i need some sipmle examples
 

New thread is created

Check these two code lines

Code:
SETB P0_0 ;turn on the light
CLR P0_0 ;turn off the light
 

In your delay routine instead of using push and pop operation use timer delays or other SFR registers like (R0-R7)...
So that by setting time you can watch the change in color of LED,
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top