Parllax USB datalogger
tabbott
Posts: 26
I am trying to connect the Parallax USB datalogger to a custom design using the OEM SX stamp IC. The board is one of our standard products - the base·PCB design·is working well. I have connected the datalogger in UART mode to the last 4 open IO pins and modified the·test code to work for our configuration - but I can get no feedback from the device.
Baud: 240
Power on: the LED on the device switched red/green then goes dark.
When I connect a USB stick the LED changes to solid red. The stick's light is on.
Datalogger pins: 1=+5, 2=CTS, 3=GND, 4=TX, 5=RX, 6=RTS, 7,8=NC
Is there a list of meanings for the different red/green LED combinations on the datalogger?
My code never exits this loop and always times out:
DO WHILE NOT(iobyte = "E")
· PAUSE 250
· SEROUT· TX\CTS, Baud, [noparse][[/noparse]"E", CR]
· GOSUB getdata
· SEROUT 16,Speed9600,[noparse][[/noparse]DEC iobyte," "]······ 'debug line
LOOP
getdata:
SERIN RX/RTS, Baud, 50000, No_Data, [noparse][[/noparse]ioByte]
RETURN
NO_data:
· SEROUT 16,Speed9600,[noparse][[/noparse]"T"]··················· 'debug line
RETURN
Baud: 240
Power on: the LED on the device switched red/green then goes dark.
When I connect a USB stick the LED changes to solid red. The stick's light is on.
Datalogger pins: 1=+5, 2=CTS, 3=GND, 4=TX, 5=RX, 6=RTS, 7,8=NC
Is there a list of meanings for the different red/green LED combinations on the datalogger?
My code never exits this loop and always times out:
DO WHILE NOT(iobyte = "E")
· PAUSE 250
· SEROUT· TX\CTS, Baud, [noparse][[/noparse]"E", CR]
· GOSUB getdata
· SEROUT 16,Speed9600,[noparse][[/noparse]DEC iobyte," "]······ 'debug line
LOOP
getdata:
SERIN RX/RTS, Baud, 50000, No_Data, [noparse][[/noparse]ioByte]
RETURN
NO_data:
· SEROUT 16,Speed9600,[noparse][[/noparse]"T"]··················· 'debug line
RETURN
Comments
Because you're not listing how the pins of the datalogger connect to the BASIC Stamp, I would suggest checking in the Test Code the I/O Definitions section. It lists exactly where each BASIC Stamp pin should connect. I have seen a few cases of the TX/RX pins being backward when trying to do it by designation rather than number. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
And, say someone·did have·the datalogger pluged in backwards or in the wrong mode·- whould that damage it? The red/green LED flashed constantly.
Here are my assignments:
CLK············· PIN 2··· 'clock output
DOline·········· PIN 1··· 'DOline/DI from tool board
CStension······· PIN 0··· 'select tension ADC
CScutoff········ PIN 3··· 'select cutoff ADC
CSeeprom········ PIN 4··· 'select EEPROM
Relay1·········· PIN 14·· 'Out to relay #1
Relay2·········· PIN 13·· 'Out to relay #2
RedLED·········· PIN 11··· 'Out to red LED
GreenLED········ PIN 10·· 'Out to green LED
YellowLED······· PIN 12·· 'Out to yellow LED
Reset··········· PIN 6···· 'In from reset switch (1=off, 0=pressed)
SpeedSelect····· PIN 7·· 'Select serial speed (1=2400, 0=9600)
CTS············· PIN 15··· 'yellow pin 2
TX·············· PIN 9··· 'brown pin 4
RX·············· PIN 8·· 'blue pin 5
RTS············· PIN 5··· 'green pin 6
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
·
I am having the exact same issue with my Parallax USB datalogger. Mine is connected to a BS2sx per the datalogger documentation. I have verified each pin connection and made sure it correlated in the code. To be sure the power to the module is adequate, I installed a separate +5VDC regulated supply. Thinking it may be the memory stick, I checked its file system using chkdsk /f·as described, all was well. I even tried a different memory stick. One of the thumb drives is 256Mb, the other is 512Mb. Like tabbott, my processor never exits the synchronization loop:
·
' For Synchronization send E until echoed back
DO WHILE (index < 1)
· PAUSE 250
· SEROUT· TX\CTS, Baud, [noparse][[/noparse]"E", CR]······ ' Transmit "E CR"
· GOSUB Get_Serial_Bytes··············· ' Get Returned Data
LOOP
·
Some documentation on the LED states would be very helpful. What should I see (LED wise) when the drive is synchronized and talking?
·
Any further help is greatly appreciated.
·
Andy
Basic Stamp 2sx
Super Carrier development board
I've noticed the same behaviour with my bs2pe (eme OWL2pe module) when using the datalogger. However by using a debug statement in the synchronization loop, I've realized that the stamp seems to stop/stall in executing its code altogether (power issue?). What's even more interesting is that while the stamp is apparently stalled, momentarily disconnecting power to the datalogger forces the stamp to continue in the synchronization loop for a while until it stalls again.
My problem originally arose after trying to write to the usb drive once, then unplugging the drive for data transfer to my computer, then plugging it back to the datalogger to write to the device again. For my application this must all happen with the power continuously on. I observed the synchronization problem during the second write attempt. Luckily, I've managed to assure reliable synchronization by setting the usb drive to "suspend mode followed by high TX and low RTS", and "awake mode followed by high TX and low RTS" after and before each write sequence; ie:
HIGH pinMEMtx
LOW pinMEMrts
PAUSE 400
SEROUT pinMEMtx\pinMEMcts, conMEMbaud, [noparse][[/noparse]$16, CR] ' awake mode
(... read/write code)
SEROUT pinMEMtx\pinMEMcts, conMEMbaud, [noparse][[/noparse]$15, CR] ' suspend mode
HIGH pinMEMtx
LOW pinMEMrts
Hopefully sharing my experiences will help one of you! Best of luck.
Frank
My stamp doesn't stall during operation, I get: T 48 T 48 T 48 T 48 ... for as long as I have it powered (I set iodata to '0') with the code I listed above. But I will try Tintin's suggestion and see what that does.
Hopefully this will rectify the issue. I’ll give it a try tonight. ··
Original code listing:
Baud··········· CON···· 84············· ' Serial Baud Rate 9600 bps (BS2)··
·
Andy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Might want to add a note to the datalogger instructions that the RX/TX lines used in the code are NOT the same as the ones listed on the pin layout.
And a list of LED meanings! Please?
As for the led meanings:·red / green flash for 2 seconds = sync to logger monitor (at power on)
·································red·on / green off = usb drive present
································ red off / green off = no usb drive
·································green on / red off = initialization
·································red flash = sending·data to drive
································ Note if red / green flash keeps occuring, no sync is found
These have·been extrapolated from the·chip datasheet on·Vinculum's website:
http://www.vinculum.com/documents/fwspecs/Vinculum%20Firmware%20User%20Manual%20V2.1%20Rev%202.pdf
As an aside, is there a way to acess pin 38 (RI#) which can be toggled to waken the device after suspending monitor and clocks?· Also, is that function on the firmware of the devices used by Parallax?
Best,
Frank
Post Edited (Tintin) : 9/6/2007 5:25:31 PM GMT
I have an example prog to test functionality, please note it does not use the RTS CTS flow control. The program works with RI# and RTS not connected and CTS hooked to VSS. The Stamp receive is Pin0 and transmit is Pin1. Download the program with the logger hooked up and the stick removed. At the DEBUG prompt insert the stick and let the logger read. When the logger has finished examining the drive try to write using the DEBUGIN.
Jeff T
Post Edited (Tintin) : 9/6/2007 6:03:25 PM GMT
once again sorry for any confusion it caused
Jeff T.
·· As the author of the documentation and code I cannot find any issues with the pins used.· The pins used in the code perfectly match the wiring diagram in the documentation.· Please tell me exactly where you see a problem and I will have the code and/or documentation revised to correct it.· Thanks.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
As I was unable to follow the wiring diagram shown, I used that list to connect to the stamp. The RX pin·needs to connect to the TX variable and so on, just like in a standard serial pin layout. I of course, got them backwards!
So a note on those lists reminding those of us who forget that the datalogger's RX/RTS is the stamp's TX/CTS would be very·helpful.
Chris, It might not be a bad idea to post a link to the Vinculum Firmware User Manual sited above in Tintin's post. I figured I had all the documentation I needed from the USB Datalogger page, another stupid oversight on my part.
Thank you
Andy
Post Edited (ahend) : 9/8/2007 4:00:28 AM GMT
That manual is linked on our website. Please see the second link on the product page below. This is also referenced in the manual. Take care.
http://www.parallax.com/detail.asp?product_id=27937
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
This is not the same document, that is why we can't find any reference to the LED's. The firmware spec (the link you indicate) is a 17 page brief. The link Tintin posted - http://www.vinculum.com/documents/fwspecs/Vinculum%20Firmware%20User%20Manual%20V2.1%20Rev%202.pdf is a 63 page user manual, complete with LED specifications and much more.
Andy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support