Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How many with 89s52 ?

Status
Not open for further replies.

jagzviruz

New Member
Hello every one ...

I am trying to make a line follower on a rectangular grid arrangement ..
I want to use a 89s52 to drive two motors and detect the lines using LDRs.I wanted to know how many maximum sensors can I use in the process ? I am a newbie to this so I assumed that I would use a clocked intrval for executing a 90 degree turn , but then what if the battery voltage decreases ? Can anyone suggest a better method ... expecting a reply.. and maybe someone can help teach me how to connect the sensors as well ..I have a circuit that uses a lm324 IC to compare the resitances and produces a outut signal.. but i am unsure as to howto connect it to the 89s52 ..plz help..

thanking in advance
 
Last edited:
first , send a circuit with your actual work. it will make things simpler

i am quite experienced with 8952 and robotics related sensors, so i should be able to help you.

you can attache many many sensor to a 89s52.. more than what you will ever need.

i can't tell you if you can directly connect the ouptut of the op-amp sensors as i don't know how the opamps are configured..(a skematic would help)

i don't think the clocked interval would be a good idea.... allways rely on on sensors to tell you your exact position.. never rely on assumptions..

is this for the ROBOCON 2007 ?
 
thanks for replying .. i am going to send u a schematics shall i email it ??? for now i am trying to figure out how to uload on this page ..

no its not for robocon 2007,havent yet seen it .. its for my college's techfest , mebbe you can give me an idea about how to go about as well PLZZ ????

you may chk out this link of my ollege at your liesure ..

**broken link removed**

thanking in advance..
 
Yes i finally maged to find the way to upload :D
attached is the sensor ckt that i had found .. but i am unable to determine where to connect the o/p pins..

the 89s52 panel is the same as on the atmel site ..
 

Attachments

  • Sensor Ckt.jpg
    Sensor Ckt.jpg
    44.1 KB · Views: 180
okay,

you have to connect Vcc to 5V. then all you have to do is to directly connect the output of opamp to a pin of the microcontroller - as simply as it sounds - !

then in the programming part, for the pins attached to the sensor to act as input pins with which you can read the sensor, you have to initialise them as "1"

i'll write a litle C code to show you (this is not tested, there may be some syntax mistakes..)

void main(void){
P1_0 = 1 // set pin number 0 of port 1 to logic level "1"

While(1){

if (P1_0 == 1){
//the sensor detected smth.
}else{
// then sensor didn't detect anything..
}

}

}
 
hmm seems very simple .. will test it out as soon as possible .. problem is there is short supply of 89s52 in the market right now .. hopefully stock comes in tomorrow ..
 
HINT, if your programmer can support it, a 89c52 will do the exct same job. and it is more available than the 89s52 ..
 
Programmer for p89c51x2bn

Hi.. all ... i got a Philips 89c51 ic ... p89c51x2bn .. my doubt is will the atmel programmer board work with it ?? or is there any other circuit for it ... plzzz help ... soon ..
 
you have to shee the datasheet of the p89c51x2bn, if it is pin to pin compatible with the 89c51, there there are big chances that it will work,
any way, you'r not loosing anything if your give it a try.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top