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.

Opti-Logic RS-232 Range Finder

Status
Not open for further replies.

jonman

New Member
Hi,

This is my first post.

I am working on a project that uses an Opti-Logic RS-100 laser range finder. I was wondering if anyone has used one of these devices.

I will be inputting the distance from the range finder into a micro processor and do a little math. I know the system inputs and outputs in RS-232 style format. It will output in ASCII “DIST:XXXX.YYU” where XXXX.YY is the range and U is the unit (Feet, Meters, or Yards). What I want to know is will it output each letter individually or as a string? Meaning will it go D = 0(starting Bit) 01000100 (D in Binary) then 0 (stop Bit) then I = 0 (start Bit) 01001001 (I in Binary) 0 (stop Bit)… and so on. Or will it only have 1 start bit then the string then the stop bit?

Any help will be great. Thank you in advance.

Jon
 

ericgibbs

Well-Known Member
Most Helpful Member
Hi,

This is my first post.

I am working on a project that uses an Opti-Logic RS-100 laser range finder. I was wondering if anyone has used one of these devices.

I will be inputting the distance from the range finder into a micro processor and do a little math. I know the system inputs and outputs in RS-232 style format. It will output in ASCII “DIST:XXXX.YYU” where XXXX.YY is the range and U is the unit (Feet, Meters, or Yards). What I want to know is will it output each letter individually or as a string? Meaning will it go D = 0(starting Bit) 01000100 (D in Binary) then 0 (stop Bit) then I = 0 (start Bit) 01001001 (I in Binary) 0 (stop Bit)… and so on. Or will it only have 1 start bit then the string then the stop bit?

Any help will be great. Thank you in advance.

Jon

hi Jon
It appears your format is 1start bit, 8 data bits, 1stop bit,, at some specified Baud rate
ASCI characters are the 'same' as you see on your keyboard and they transmitted one character at a time.
SO “DIST:XXXX.YYU” would be sent as D I S T : etc to Y Y U and then a carriage line feed code at the end of the string.
The CR LF string is 0Dh 0Ah, this tells the receiving program thats the end of the data string.

Do you follow OK.?:)

EDIT:
The 'D' would be 1start 00100010 1stop. Note the ASC data is sent least significant bit first [backwards]
then the 'I' start 10010010 1 stop and so on until the end of the data string.
 
Last edited:

jonman

New Member
Yeah I follow you and thank you for the reply. For RS-232 format the logic 0 is +5V and the logic 1 is -5V (or at least that's what I got from Wiki). The start bit is +5V (logic 0) and the stop bit is -5V (logic 1). You are right about the LSB comes first. Thank you for letting me know that each character will be sent separately. That is exactly what I needed.

Also the baud rate is 19200. Does that mean that each character would take 0.521ms? I would have to make a delay to take in the serial data.

Thank you for your help

Jon
 

ericgibbs

Well-Known Member
Most Helpful Member
Yeah I follow you and thank you for the reply. For RS-232 format the logic 0 is +5V and the logic 1 is -5V (or at least that's what I got from Wiki). The start bit is +5V (logic 0) and the stop bit is -5V (logic 1). You are right about the LSB comes first. Thank you for letting me know that each character will be sent separately. That is exactly what I needed.

Also the baud rate is 19200. Does that mean that each character would take 0.521ms? I would have to make a delay to take in the serial data.

Thank you for your help

Jon

hi,
19200 Baud is bits /sec, so if a byte is formatted as 1start, 8 data, 1stop thats 10 bits per character, so if you divide 19200/10 you will get approx 1920 characters per second.

I would check.:)
RS-232 - Wikipedia, the free encyclopedia
 

Attachments

  • AAesp01.gif
    AAesp01.gif
    27.9 KB · Views: 102
Last edited:
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top