Ultrasonic sensor(SN-LV-EZ1)

Digital Fiber, Photoelectric, Laser Range, Optical, Temperature, Rotary Encoder, Ultrasonic, Gas, Gyro, Accelerometer, FlexiBend, Flexiforce, Compass......

Ultrasonic sensor(SN-LV-EZ1)

Postby bmhong » Wed Dec 01, 2010 10:56 pm

I use the TX output connect to RC7(PIC16F877A),but the lcd show some strange symbol!Can tell me what is the problem?
bmhong
Greenhorn
 
Posts: 2
Joined: Wed Dec 01, 2010 10:43 pm

Re: Ultrasonic sensor(SN-LV-EZ1)

Postby yonghui » Thu Dec 02, 2010 12:21 am

hi,

what LCD u are using? what did u send to your LCD?


regards,
yh
thanks&regards,
yh
yonghui
Moderator
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm

Re: Ultrasonic sensor(SN-LV-EZ1)

Postby bmhong » Thu Dec 02, 2010 2:07 am

The lcd i also bought from cytron ,the product code is DS-LCD-162A and send asynchronous serial.Got any idea can decode the symbol into digit number?
bmhong
Greenhorn
 
Posts: 2
Joined: Wed Dec 01, 2010 10:43 pm

Re: Ultrasonic sensor(SN-LV-EZ1)

Postby yonghui » Thu Dec 02, 2010 10:22 am

hi,

simply sending values to LC wont work.the value need to be converted to BCD. then coverted to ascii code to be sent to LCD. the LCD accept only ascii code. refer to usermanual of the LCD for the code need to be sent to LCD. so u will need careful coding in the conversion. or else download the library available from cytro's DIY project. and remember that BCD conversion is need to display properly on the screen.

for example if u wan to display number 11. u are not goin to send 11 to the LCD. u are goin to send two digits of '1' to the screen. if u send 11 to screen, the LCD will display unknown symbol on screen.

11/10=1;
11%10=1;

convert 1 to ascii, send to LCD;
convert 2nd 1 to ascii, send to LCD;


regards,
yh
thanks&regards,
yh
yonghui
Moderator
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm

Re: Ultrasonic sensor(SN-LV-EZ1)

Postby ober » Fri Dec 03, 2010 5:46 pm

bmhong WROTE:I use the TX output connect to RC7(PIC16F877A),but the lcd show some strange symbol!Can tell me what is the problem?


The Tx output of Ultrasonic Range Finger is not UART, it is 0-5V RS232 standard. You can refer to PR23's schematic for the sample interface.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: Ultrasonic sensor(SN-LV-EZ1)

Postby shiyan » Sun Dec 05, 2010 7:45 pm

bmhong WROTE:I use the TX output connect to RC7(PIC16F877A),but the lcd show some strange symbol!Can tell me what is the problem?


Woh... there is 2 things here need to be clear.

1. The transmit from ultrasonic, it is UART? If not, surely you cannot connect to PIC' RX pin directly. The ultrasonic does not have datasheet or User's Guide? Oh... the Maxbotix? OK, I got it now, most of their ultrasonic Tx output is RS232 but half standard only. Because it is 0-5V. It do state in the datasheet, look carefully.

2. And the program you written for the whole "translation", have you tested it? a quick way is to use any terminal program on computer, connect to your microcontroller, and type any key. If the program is correctly written, you should see something. Yes, it might also be the LCD problem :)
User avatar
shiyan
Amateur
 
Posts: 189
Joined: Wed Jun 09, 2010 10:59 am


Return to Sensor

Who is online

Users browsing this forum: No registered users and 13 guests

cron