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.

made the SONAR; how to get on with 8051 microcontroller?

Status
Not open for further replies.

teeb

New Member
Made the sonaar reciever and transmitter and are working fine.
I need to calculate the distance so i need to interface the 8051microcontroller with Reciever and transmitter. i just dunt knw how to start up with the microcntroller part. then i need to display the distance calculated on a LCD screen or a 7 segment display.
CAn anyone help with the coding? and how to the interfacing? i need to complete the project as soon as possible
 
Can you give us some links to the transmitter and receiver datasheets? It's pretty hard to help if we don't know what you've got.
 
Well it looks like you have a digital output pin and a digital input pin. I don't know if there is any significance to the choice of pins on the Basic Stamp. Specifically if there is any usefull hardware associated with those pins. If not then you can pick any convenient pins of the 8051, connect them to the transmitter and the receiver and duplicate the Basic coding in assembly language.
 
hmmm...thnks for replying :)

hmmm....wat do u mean by duplicating the basic code? actuallly i dunt knw how to set the timmers of 8051 to calculate the time elapsed between transmission n reception of the pulse. Can u help me in that?
 
The Basic Stamp has a prgramming language that looks like Basic. Basic is a programming language developed at Dartmouth University in the early 1960's. AFAIK there is no widely available basic interpreter for a generic 8051 that is compatible with the Basic Stamp. The low cost alternative to Basic is assembly language. In order to program the timers you need to be able to follow the description of the hardware contained in the datasheet or the hardware description manual. Here are some links to some reference manuals for the Atmel line of 8051's

Hardware Manual
https://www.atmel.com/dyn/resources/prod_documents/doc4316.pdf
Instruction Set Reference
https://www.atmel.com/dyn/resources/prod_documents/doc0509.pdf
AT89C51ED2 - a typical 8051 type part
https://www.atmel.com/dyn/resources/prod_documents/doc4235.pdf
 
Basic for the 8052

Hola P B,
I recall that all I did with the 8052 was in BASIC. More than 12 years ago.

Is it any possibility that it could be useful here? It was the BASIC supplied by Intel itself.

I am currently working in assembly (only) with PICs but recall that as being quite simple and easy. Got my first LCD up and running in hours with no previous experience at all!
 
As I recall Basic Stamp is a highly styleized version of Basic. There may be equivalent structures in some other Basic but I'm not familiar with the details. For what the OP wants to do I think assembly language is the only way to measure the return signal accurately. I could be wrong however -- it's happened before.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top