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.

Help me please!!!With PRoject 8051

Status
Not open for further replies.

jtanium

Newbie level 3
Joined
Mar 15, 2007
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,300
Now I'm studying Microprocessor with 8051 I do my project so I can't write a program . I would like some of EXAMPLE .etc ...Red light Green light in crossroad .
I would like some source code.Please Give Me some help !!!

Thank you so much for your help!
:cry::cry::cry:
 

It's easy to write a program to the 8051 microcontroller. But first of all you need a flash programmer to download your codes in to 8051. You can find easily this circuit by searching net. Then you need a KEIL in order to program 8051 with high level language c. Also you can find a lots of examples written in c in linux forums. That is a short example program blinking led connected to the 8051 P0.0 pin.

#include <reg51.h>
#include <stdio.h>

long int i,j;

main()
{
while(1)
{
P0_0=1;//set P0.0 pin to logic 1
for (i=1;i<=1000;i++) //for delay
for (j=1;j<=1000;j++) // for delay
P0_0=0; //set P0.0 pin to logic 0
for (i=1;i<=1000;i++) //for delay
for (j=1;j<=1000;j++) // for delay
}
}

Hope its helpfull
 

Thank you so much!!!
I have all things to load a program but my problem is "I don't have a EXAM code.
....How can I write a assembly...I need some EXAM project with ASSAMBLY LANGUAGE.
 

while(1)
{
P0_0=1;//set P0.0 pin to logic 1
for (i=1;i<=1000;i++) //for delay
for (j=1;j<=1000;j++) // for delay
P0_0=0; //set P0.0 pin to logic 0
for (i=1;i<=1000;i++) //for delay
for (j=1;j<=1000;j++) // for delay
 

I hope i can help u.....

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
 

I need more details.This project I make a crossroads.Simulate form a traffic lights.It's has RED GREEN and Yellow light....Help me please....I don't have a little knowledge about assembly.
 

you can use C code , it's available it embedded C book bt Michael J Pont there is a example for Traffic lights

regards SYRAX
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top