Having trouble with DataLogger, please help!!!!
I can't get the javalin to communicate with the datalogger
It just hangs for a long time (not consistant) and once and a while I get a "no disk presecnt Please insert disk" message.
It is hooked·up for UART protocol.
OK, so there what I tried
I changed the connetion wires to 1K resistors. (before changing them out I was only seeing about 2.2 volts on the scope, now I'm seeing 5)
Tried three diferent thumb drives (2 1Gig, and a brand new 4 Gig)
I'v reformatted one of the 1Gig's for FAT 512 ( by the way is FAT the same as FAT16 when fromated from windows?)
I'v also tried cycling the power.
I'v spent the last two weekends tring to get this thing working.
I'm tring to run the dataloggerUARTtest code found in the forum.
DataLoggerUART class
Revision History:
·* March 25, 2009 v1.1: Updated.
·* January 16, 2008 v1.0: Initial release.
·* @author Peter Verkaik (verkaik6@zonnet.nl)
Iwas unable to get it working in SPI mode also.
It new 4Gig drive light does blink and then turn off where the 2 1Gig stick the light just stays on.
It just hangs for a long time (not consistant) and once and a while I get a "no disk presecnt Please insert disk" message.
It is hooked·up for UART protocol.
OK, so there what I tried
I changed the connetion wires to 1K resistors. (before changing them out I was only seeing about 2.2 volts on the scope, now I'm seeing 5)
Tried three diferent thumb drives (2 1Gig, and a brand new 4 Gig)
I'v reformatted one of the 1Gig's for FAT 512 ( by the way is FAT the same as FAT16 when fromated from windows?)
I'v also tried cycling the power.
I'v spent the last two weekends tring to get this thing working.
I'm tring to run the dataloggerUARTtest code found in the forum.
DataLoggerUART class
Revision History:
·* March 25, 2009 v1.1: Updated.
·* January 16, 2008 v1.0: Initial release.
·* @author Peter Verkaik (verkaik6@zonnet.nl)
Iwas unable to get it working in SPI mode also.
It new 4Gig drive light does blink and then turn off where the 2 1Gig stick the light just stays on.
Comments
http://forums.parallax.com/showthread.php?p=793294
My post from March 25, 2009 9:16 AM attaches SPI version classes that work.
My post from March 25, 2009 12:55 PM attaches Uart version classes that I
have not tested but have been reported to work, although not with every
USB stick.
which makes me believe there is a power issue here or a connection short. The Datalogger module requires
quite a lot of current. If your board that carries the Javelin (Javelin demoboard?) is battery powered
then that may be the cause the datalogger is not working.
The usb stick should be formatted as FAT16 (named FAT in windows)·with·512 byte sectors.
regards peter
I don't think its a power issue. I am using the Javelin demoboard though.
I missed the fact that I,m suposed to use the SPI class with the UART test code.
I"ll try that now, and let you you know if that works.
Thanks
which is way too high. My guess is the LM2940 regulator does a thermal shutdown
at a lower current (meaning dropping the 5V output and so the datalogger
will not work). Try getting a 7.5V/1A power supply.
regards peter
I'v tried different pins and still get 2.2 Volts.
Could the be a problem with the data logger driving circuit for the Tx?
It puts out the pulses every time I insert or remove the drive, but it's only 2.2 volts.
Please help.
I expect this voltage to be much lower than 5V for the reason I gave in
my previous post.
regards peter
Yet I'm only seeing 2.2 volt pulses on the logger Tx (on the scope).
I see the full 5 volts from the javelin Tx.
I didn't think that would be necessary.
Can you draw a picture how you have everything connected (exactly),
not how you think you have everything connected.
If you only get 2.2V there could be a wiring error.
regards peter
1>>>Vss
2>>> PIN 11
3>>>Vdd
4>>>PIN10
5>>>PIN9
6>>>PIN8
8>>>PIN7
Code pertaining to the UART as follows:
//Datalogger SPI pins
static final int pinTX = CPU.pin10; //serial data out (connects to Vinculum RXD pin) 4
static final int pinRX = CPU.pin9; //serial data in (connects to Vinculum TXD pin) 5
static final int pinCTS = CPU.pin11; //serial hs in (connects to Vinculum RTS pin) 2
static final int pinRTS = CPU.pin8; //serial hs out (connects to Vinculum CTS pin) 6
static final int pinRI = CPU.pin7; //wakeup out (connects to Vinculum RI pin) (optional) 8
static final int CR = 13; //Carriage return
static Uart tx = new Uart(Uart.dirTransmit,pinTX,Uart.dontInvert,pinCTS,Uart.dontInvert,Uart.speed9600,Uart.stop1);
static Uart rx = new Uart(Uart.dirReceive,pinRX,Uart.dontInvert,pinRTS,Uart.dontInvert,Uart.speed9600,Uart.stop1);
Also, I would use the SPI interface as that is synchronous
and always returns data, even if corrupted. The uart VP code
may not recognize characters if corrupted but these are
just ignored.
regards peter
I wanted to use the UART because the javelin is also running two 8 channel ADC's and a TI time and date chip using SPI, and a 4x20 display using UART.
I wanted to be able to dump the data to the UART VP and not have to worry about it again beacuse it would be going in the background.
because·then you know all connections are ok.
Right now we don't know.
regards peter
Note: I'v tried it with the wires in place of the resistors and that didn't word either.
http://www.arbortech.com/pt/circuits/IMG_3632.JPG
http://www.arbortech.com/pt/circuits/IMG_3636.JPG
·
I'm still only getting 2Volt pulses between the Javelin pin 11 and Logger pin 2.
All the others a 5 volt pulses, and it still is just hanging after the inital "Datalogger Test Program for Javelin".
Any other thoughts?
Please attach pictures to your next post.
regards peter
JavP11 -> DL.2 (SDO)
JavP10 -> DL.4 (SDI)
JavP9 -> DL.5 (SCLK)
JavP8 -> DL.6 (CS)
JavP7 -> DL.8 (no connection)
Also, DL jumper is set to uart mode. Change it to SPI mode.
Recycle power so datalogger sees SPI jumper on powerup.
Remove JavP7 as it is not required.
In the DataloggerSPI_test program
Change it to match pins
Download DataloggerSPI_test to javelin.
Let us know the results.
regards peter
The pictures were taken when I was in UART, before I went back to SPI.
I had switchted it back to SPI right after I took the pictures the first time I sent them and you could,nt open them.
It still is not working.
It just hangs after the inital "Datalogger Test Program for Javelin"
What brand and Model are you using?
IF I had known there things were so finiky, I wouldn't had bought this @#$%^ thing.
Now every time I remove the USB stick, I have to reformat it.
If this thing trashed my drive I'm really going to be ticked.
Post Edited By Moderator (Chris Savage (Parallax)) : 8/21/2009 5:55:19 PM GMT
It displays characters returned by the datalogger, and it allows
you to send commands to the datalogger.
Make sure the pin constants match your setup.
regards peter
As for having to format a drive everytime you remove it, that doesn't make any sense.· The only time the drive could be corrupted is if it were being written to when you removed it.· But you have already stated that you are unable to write to the memory stick.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
to the demoboard regulator. It depends on the current draw of datalogger+usbstick when that
regulator enters thermal shutdown. A drop in Vdd during write could have unwanted effects.
I still recommend using a 7.5V/1A power supply.
When I wrote the class I used a Databar 1GB stick.
regards peter
Post Edited (Peter Verkaik) : 8/21/2009 6:32:40 PM GMT
If there is a drop in Vdd, I should be able to pick it up on the scope. I've checked the Vdd to Vss with the scope (2micro sec /div (trigger on falling and rising edge)) and see no drop what so ever when running the test code or when inserting and removing a drive, or when cycling power to the logger.
I had three different USB sticks (one of which is a ScanDisk Cruzer micro 2GB) that I has reformatted through windows as FAT 512. After trying them in the logger and trying the DataloggerSPI_test program, I took them back to the desktop and they needed to be reformatted. I've tried several times (even right after rebooting the desktop) and they will not reformat FAT 512 any more. However they will format FAT32(default) and the default file allocation size. I've even tried reformatting them FAT 512 after first reformatting them FAT32 16K, and they still wouldn't format FAT 512.
Last night I ran the File Attachment : DataloggerSPI_ManualCommands_test.java and got no return messages.
I'm going to go out today and buy one of the following recommends drives (off the Paralax web site, logger page):
Transcend® USB Flash Drive 1GB, Kingston® Technology 2GB DataTraveler 100, SanDisk Cruzer® Micro USB 2.0 Flash Drive 1GB.
getting no response at all), also contact Parallax Tech Support.
It is possible the logger has a defect.
regards peter
Your name came up at some point, I can't remember if he said that I should talk to you or that He wanted to talk to you, and that you were the guy to talk to about getting the logger working with the javelin.
I found a SanDisk Cruzer micro USB2 1 gig drive. I also add a coulpe of· Format.printf line to track where it is hanging.
······ Lines added:
······· Format.printf("Datalogger Manual Commands Test Program for Javelin\n");
··· CPU.delay(31500); //wait 3sec
······ Format.printf("a\n");
··· logger.diskIdentify(dirbuf);
······ Format.printf("b\n");
··· CPU.delay(31500); //wait 3sec
······ Format.printf("c\n");
··· Format.printf("disk info:\n");
······ Format.printf("d\n");
··· Format.printf("%s\n",dirbuf);
After starting, I get back the "Datalogger Manual Commands Test Program for Javelin" and "a".
Which means that it is hanging on the· "logger.diskIdentify(dirbuf);" line.
I am still only getting 2 volts on the logger pin #2.
What is the min voltage for logic high for the javelin?
Either the the javelin is not picking up the logic high or the logger is not outputting a voltage high enough.
I still thing I got a bad logger (the voltage on pin 2 should be closer to 5 volts)?
but definitely not for the javelin which has a treshold of 2.5V
Besides that, output high of the logger should be close to 5V.
Talk to Tech Support again and insist on replacing the unit.
There are ways to pull up the 2V to 5V, but we don't know
why you get the 2V. There is probably an internal defect
that may also affect your usbstick in a bad way.
regards peter
I will contact them on Monday.
I have requested that we simply swap out the Datalogger. From my understanding Tech Support has already gotten this underway as of this morning. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering