Laser Range Finder Image Viewer V1.2 , can only grab an image at 9600 and 19200 baud?
zappman
Posts: 418
I am using the Laser Range Finder Image Viewer V1.2 software, and I can grab an image at 9600 and 19200 baud, but not at 11520, 57600 or 38400 baud, when using my serial bridge program.
Link to page to download viewer software: http://www.parallax.com/downloads/laser-range-finder-image-viewer
Version Details from the above URL:
1) Does the "Laser Range Finder Image Viewer V1.2 software" work at 11520, 57600 or 38400 baud (can or has someone tested it)?
Yes, the Laser Range Finder Image Viewer V1.2 software" work at 11520, 57600 or 38400 baud, tested with my PropPlug.
2) Where can I download the "Laser Range Finder Image Viewer V1.1 software", so I can try it at at 11520, 57600 and 38400 baud?
I guess I don't need V1.1 since V1.2 works with my PropPlug
3) Any other help resolving this problem, will be appreciated.
Still need to get my serial bridge program working.
Here is a screen shot of a good LRF Image Grab at 19200 baud.
Here is a screen shot of the "LRF Index outside the bounds of the array." error, I get when trying a LRF Image Grab at 384000, 57600 or 115200 baud
I am using a Propeller Activity Board Rev. B running the code below connect the "Laser Range Finder Image Viewer" to the "LRF"
Attached zip file:
ParallaxLaserRangeFinderBridge-001 - Archive [Date 2015.01.09 Time 15.24].zip
This is what I get when send the "v" command to the LRF
Link to page to download viewer software: http://www.parallax.com/downloads/laser-range-finder-image-viewer
Version Details from the above URL:
Version 1.2
Adjusted serial port RX timeout based on baud rate (to avoid a timeout during frame grabs at baud rates 38400 and lower).
Reduced baud rate selection to 9600, 19200, 38400, 57600, and 115200 (it's unrealistic to use the tool with lower baud rates).
Modified serial port routines to work regardless of the user's current Windows Regional and Language Options settings (force character set encoding to Windows-1252).
Disabled COM port/baud rate selection while device is connected.
1) Does the "Laser Range Finder Image Viewer V1.2 software" work at 11520, 57600 or 38400 baud (can or has someone tested it)?
Yes, the Laser Range Finder Image Viewer V1.2 software" work at 11520, 57600 or 38400 baud, tested with my PropPlug.
2) Where can I download the "Laser Range Finder Image Viewer V1.1 software", so I can try it at at 11520, 57600 and 38400 baud?
I guess I don't need V1.1 since V1.2 works with my PropPlug
3) Any other help resolving this problem, will be appreciated.
Still need to get my serial bridge program working.
Here is a screen shot of a good LRF Image Grab at 19200 baud.
Here is a screen shot of the "LRF Index outside the bounds of the array." error, I get when trying a LRF Image Grab at 384000, 57600 or 115200 baud
I am using a Propeller Activity Board Rev. B running the code below connect the "Laser Range Finder Image Viewer" to the "LRF"
{{ ParallaxLaserRangeFinderBridge-001.spin ____________________________________________ Code written by Duane Degn for use with Say It Module ____________________________________________ Modified for use with Parallax Laser Range Finder Product ID 28044 by M.Sapp 2015_01_09 Image grab works at 19200 and 9600 baud using 28044-LRF-ImageViewer-1.2 software and Propeller Activity Board Rev B This program must be loaded into EEPROM on the Propeller Activity Board. Then, "power off then on", "both the LRF and the Propeller Activity Board". Then, run the "LRF-ImageViewer" software. REMEMBER: LRF Power must be cycled for theLRF to set to a new baud rate. _____________________________________________ }} CON _Clkmode = xtal1 + pll16x ' 80MHz Change these two settings to match _Xinfreq = 5_000_000 ' your setup. ' Pin Assignments ' _LrfLed = 26 ' Connected to Led on Say It 15 _LrfTx = 6 ' Connected to Rx (Sn on LRF) _LrfRx = 7 ' Connected to Tx (Sout on LRF) _DebugTxPin = 30 _DebugRxPin = 31 _LrfBaud = 19200 '11520 57600 38400 19200 9600 OBJ Com[2] : "FullDuplexSerial" ' uses two cog PUB Main | localIndex, localAttmpts Com[0].start(_DebugRxPin, _DebugTxPin, 0, _LrfBaud) Com[1].start(_LrfRx, _LrfTx, 0, _LrfBaud) waitcnt(clkfreq / 4 + cnt) repeat result := Com[0].rxcheck if result <> -1 and result <> 0 Com[1].tx(result) result := Com[1].rxcheck if result <> -1 and result <> 0 Com[0].tx(result)
Attached zip file:
ParallaxLaserRangeFinderBridge-001 - Archive [Date 2015.01.09 Time 15.24].zip
This is what I get when send the "v" command to the LRF
Parallax Laser Range Finder
Designed by Grand Idea Studio [www.grandideastudio.com]
Manufactured and distributed by Parallax [support@parallax.com]
FW = 1.0
MFG = 7FA2
PID = 7691
SLOPE = +0.00142183 (3ABA5CB6)
INT = -0.02270363 (BCB9FCF8)
PFC_MIN = 38
Comments
I have not gone through all the files available.
http://www.grandideastudio.com/portfolio/laser-range-finder/
Do you have a PropPlug or other USB to serial device? I'd think the program would have a better chance of success using a USB to serial device than with using a serial bridge written in Spin.
If you don't have a USB to serial device, and need to use the Activity Board as a bridge, it might help to use serial drivers with larger buffers.
I see the LRF has a spot for a PropClip but not a PropPlug but this doesn't matter since you'll want to use the "SIN" and "SOUT" pins. Just connect the PropPlug's RX to the SOUT pin and the TX to the SIN pin. The PropPlug's VSS needs to be connected to the LRF's "GND" pin. You'll need some way of connecting the "GND" pin to both the PropPlug and the LRF's power source.
Hi Publison, yes I tried Joe Grand's web site. I could not find the the version 1.1 software on his site. His site only has a link to the version 1.2 software located on the Parallax site.
I found my PropPlug. Hooked it up to the LRF, Laser Range Finder Image Viewer V1.2 works at all baud rates.
I have the LRF hooked to my spare Activity Board, because I am trying to write a Propeller C program, to use the LRF on my "FrankenBot" robot. I was getting intermittent errors when using the "v" version command, and "h" help command at baud rates over 19200. That is why decided to the configure the Activity Board into the bridge mode. Besides, taking distance measurements, I would like my "FrankenBot" robot to be able to save pictures to the Activity Boards sd card.
I am a beginner at programing, I will search for "serial drivers that have larger buffers".
I would still like to use the Laser Range Finder Image Viewer V1.2 software with an Activity Board and a serial bridge program.
My ultimate goal is to have a Propeller C program, that can save LRF image grabs to the sd card on an Activity Board.
Tracy Allen's version of the four port serial driver allows one to set the buffer sizes. I often use his driver even if I'm only using it with a single port. His driver correctly catches framing errors which are missed by most other serial drivers.
I've had trouble using the driver with multiple ports at high bit rates. If you need two ports communicating at 115200bps both at the same time, you'll probably want to use two serial objects similar to the two instances of FullDuplexSerial in the bridge program.
Unlike FullDuplexSerial, you can't just use two instances of the four port driver.
Where previously we used:
to declare the two drivers, if you want to do something similar with the four port driver you'll need:
"FullDuplexSerial4portB" can't be an exact copy of "FullDuplexSerial4port" with just a different name. The object has to have been changed so the compiler doesn't see it as the same object.
If you want to use two 4 port drivers, you could use the "FullDuplexSerial4portB.spin" file in my GitHub "Cleaver" repository. You may also need "DataIo4PortB" which has many of the I/O methods such as "Dec" and "Hex". You shouldn't need either of the "DataIo4Port" objects if you're just modifying the serial bridge program.
Here's the bridge program converted to use Tracy Allen's driver.
The program compiles but I haven't tested it.
The buffers may be adjusted in Tracy's driver by adjusting these constants.
Apparently you're not supposed to set any of the buffers to zero but you could change the buffers to the unused ports to one if you wanted to same some RAM.
You may want to set "RX_SIZE0" and "TX_SIZE0" to larger values.
To make it easier to find all the objects, I attached the archive to this post.
I can load ParallaxLaserRangeFinderBridge-001.spin into the Activity Board and Laser Range Finder Image Viewer V1.2 can do image grabs at 19200 baud.
When I load ParallaxLaserRangeFinderBridge-002.spin into the Activity Board and Laser Range Finder Image Viewer V1.2 can NOT do image grabs at 19200 baud. Also, the LRF will not set it's baud rate using ParallaxLaserRangeFinderBridge-002.spin.
If I set the LRF baud rate with -001 loaded into the Activity Board, then switch the Activity Board to running -002, I can sometimes send the r, l, v, h commands to the LRF and get a response. But, I can't do an image grab, I get the out of bounds error.
If you look at fullDuplexSerial4Port object page at http://obex.parallax.com/object/248 there is a comment that says:
Maybe this is what is keeping "ParallaxLaserRangeFinderBridge-002.spin" from working?
It's very interesting to hear the FullDuplexSerial appears to work better in this situation. I'm not sure, but I thought full duplex serial also had the extra bit.
Did you try changing the buffer sizes? I'd suggest making both the TX and RX buffers on port zero (in both objects) 1,000 bytes just make sure the buffer size isn't causing an issue.