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.

ultrasonic distance finder with 8051

Status
Not open for further replies.

mhe

Junior Member level 1
Joined
Aug 21, 2005
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,373
ultrasonic 8051

hi ,i will create a project distance finder with 89c51 and ultrasonic sensor.i use assembly language.but i have any problem.i create a40khz freq and send it then i start timer and with first trigger in reciver i stop timer.i obtain 2 value in TL1,TH1.well i want conver 2 byte
TH1,TL1 to a word and then (word/2) * 340(speed of sound) and show in seven segment.i write afew program but i cant commpleate calculate and show TH1,TL1. please commpleate it or help me.plzzzzzzzzzzzz

ORG 0H
MOV P0,#0FFH
MOV P1,#0
LJMP MAIN

ORG 0013H
SETB TR1
HERE: JNB INT1,HERE
CLR TR1
MOV R0,TL1
MOV R1,TH1
LJMP CAL



;====================FREQ=========
FREQ: SETB TR0
H: JNB TF0,H
CLR TR0
CLR TF0
CPL P2.0
SJMP FREQ





;============MAIN========
ORG 30H
MAIN: MOV IE,#10000100B
MOV TMOD,#12H
MOV TH0,#-12
MOV TL1,#0
MOV TH1,#0
F: JB P0.0,F
SJMP FREQ
;===============CALCULATE=======
.
.
.
 

distance+avr+basic+ultrasonic

any idea

Added after 53 minutes:

i want just, just ,just 8051 project..:cry:
 

ultrasonic+8051

HI
I coulden't understand your problem.
is it in 16 bit multiplyand division calculations?
 

distance measurement 8051

avr is better try it too!
 

‌ultrasonic 8051

I think (word/2) * 340(speed of sound) is wrong unless you have seconds in TH1,TL1, and I don't think you do.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top