8051 proramming
Fri, 05/21/2010 - 19:08
I need to do a 8051 assembly program to control the automobile warning buzzer.Criterion are:
-buzzer activates if headlights are on and the driver's door is opened(they are connected by AND gate or
-buzzer activates if key is in ignition and driver's door is opened.(connected in AND gate)
So...what command should i put if i want to activate the buzzer based on the above criterion????


hi sleepy can u post a rough sketch of your the circuit, so that ppl can help u to achieve you task..
how to upload an image
Hi sleepy,
Programming part is pretty easy for the above mentioned task but it completely depends on your circuit diagram. Upload your circuit diagram then only it will be clear on which pins input is being received and on which pins output needs to be sent. Follow the link given by aamiraarfi in the above post to learn how to upload image(s).
Attached is the circuit:
More info on circuit:
1.headlights on,(by pressing S1);led1 on.
2.keys in ignition(by pressing S2);led2 on.
3.driver's door opened,(by pressing S3);led3 on.
4.when buzzer activated,7 segment(SSD1 and SSD2)will display "On";led4 will blink at an interval of 0.5 secs.
HI sleepy! its nice to see your post
I would advise you to go through this easy tutorial given on botskool
8051 i/o assembly programming reference
Make a small flow diagram and try to write a code on your own ..It 'll help you learn better.
hints:
Define your input and output pins
Use conditions and loops to turn on/off buzzer
Input pins:Headlight On, Key in ignition & Door open
Output pins: LED1, LED2 and Buzzer
Logical operations will be done using assembly program like AND OR.. (depending upon the value of inputs, output pins will be set high)
If you happen to fail post your logic and code, we are always there to help you ..
happy coding
Hi sleepy,
Follow the instructions given by aamiraarfi in the above post. I have some suggestions for your circuit. Check out the circuit diagram given below -
Hi Shashwat,
So...what should I do or rather what code should I put if I want the buzzer to activate if both the headlights and driver's door are opened.Give a hint pls.
Hi sleepy,
Have you gone through this tutorial - http://www.botskool.com/tutorials/electronics/8051/input-output-instruct...?
Hi Shashwat,
sort of.I only managed to on the Led1 but I got no idea at the how to on Led3 too in order to activate the buzzer.
Note:- This post has been edited by sleepy at Thu, 03/11/2010 - 14:52.
Hi anyone got solution to the program mentioned???Needed urgently.Tks!!
Hi sleepy,
Have you decided which sensor you are going to use for detection of all the three conditions - key in ignition, headlights on & door opened? If yes then before writing 8051 assembly code you need to decide first that output from all these three sensors are being received on which pins of microcontroller 8051. Kindly post these details and I ll help you write relevant 8051 assembly code for buzzer.
Hi fatty,
For detecting a crossover you need to have atleast have three ir sensors (one in centre and two on sides). If the bOt is following a black line, you can easily detect a crossover because when the bOt is a on crossover all the three ir sensors will be on black line. When such a situation arises just give the bOt command to move forward.
To be able to comprehend this concept properly I will suggest you to go through this tutorial first - Line Follower.
thanku
Hope it helps.
the forward command will be 'turning on all d sensrs'??????
Note:- This post has been edited by fatty at Thu, 03/11/2010 - 16:41.
The forward command will rotate both the motors in the forward direction. Once the condition is satisfied that all the three sensors are on the same colour as that of the line then the bOt should be this forward command.
Thanks Shashwat,below are the pins using:
For the buzzer,i am using 7 segment to replace the buzzer,segment will display "On" and led4 will
blink at a interval of 0.5 secs.
S1 using P1.0
S2 using P1.1
S3 using P1.2
Led1 using P1.4
Led2 using P1.5
Led3 using P1.6
7 segment (SSD1 and SSD2) using P0.6
Note:- This post has been edited by sleepy at Fri, 03/12/2010 - 10:42.
yr plz tell me wats d book or link to study basic moving codes of robots plz
Hi fatty,
Check out this link - http://www.botskool.com/tutorials. It contains a lot of tutorials.