Shop OBEX P1 Docs P2 Docs Learn Events
Can't seem to get the data logger working — Parallax Forums

Can't seem to get the data logger working

MovieMakerMovieMaker Posts: 502
edited 2008-11-05 21:19 in BASIC Stamp
Sorry, Guys!

·· I have hooked everything verbatim the way the PDF file said.· It is wired 100% correct. I did it six times.· Next, when I turn it on, the data logger blinks red and then green for a few seconds. Then it stays red and the usb memory device goes green.
·· When I hook up a usb to the usb/serial connector, it blinks red and then green and stays green.
··· when I run the demo and test programs, they initialize and then say "synchroizing. . ." forever.
··· It was suggested that I reflash the chip on the datalogger with the new bios. I tried that, but how can you flash something that is not showing up for you to get to?
··· I have tried two different usb jump drives of different manufactors.

··· I am at a loss. Any help would be apreciated and thanks in advance.

··· Oh, I am using this with a boebot with a BasicStamp2px24 and a Board of Education Serial RevC.

I don't know what I am doing wrong???



·
«1

Comments

  • SRLMSRLM Posts: 5,045
    edited 2008-10-30 02:32
    I bet that you didn't change the baud in the code. For the BS2 px, you need to serout at 396. The demo program is·for a regular BS2 (at 84, I think)·Also, make sure that the code is using the right pin numbers.

    Also, have you made sure that the USB Drive format was a FAT?
  • MovieMakerMovieMaker Posts: 502
    edited 2008-10-30 02:37
    thanks srlm,

    ·· I believe the baud rate is 396 which comes out to 9600 baud. I looked at that in the terminal screen. It said 396 and the baud was set to 11,200 or something like that. But, that was from the Computer to the boebot, and it was darkened so I could not change it. In the code going to the datalogger, it was 396.· Good point. But, I think that part is right.

    ··· :-)
  • MovieMakerMovieMaker Posts: 502
    edited 2008-10-30 02:43
    You were Right! I could have sworn I saw 396 , but it was 84. So I changed it and it worked, sortof. I am still running it. It wrote to the file. Now, I have to go back and try to read.

    It is funny. Most of my problems seem to have stemmed from baud rate. I am a guy who in the 70's and 80's hand wired all of the modem and telecommunication equipment at different baud rates. I know how important it is, I just overlooked it.

    I will be right back . . . . . .
  • MovieMakerMovieMaker Posts: 502
    edited 2008-10-30 02:47
    It said "Error reading the seed file -- Halting execution!" But, it has went further than the last 3 weeks of working with this.

    I'll Be right back!
  • MovieMakerMovieMaker Posts: 502
    edited 2008-10-30 02:50
    It opened the datalogger, synchronized it. It wrote some data and then tried to read. When it read it, it stopped there. I think I am on the right path.



    Thanks,



    :-)
  • MovieMakerMovieMaker Posts: 502
    edited 2008-10-30 02:57
    Where does it show what pins it is supposed to be?
  • MovieMakerMovieMaker Posts: 502
    edited 2008-10-30 03:13
    What mode should I be using this? UART is what I have it set for . Or, SP1 mode??
  • SRLMSRLM Posts: 5,045
    edited 2008-10-30 05:10
    I use whatever mode the default is, as shown in the test code (UART, I think...). Anyway, the pins are defined at the begining of the code. It doesn't really matter which I/O pins that you use, just that they go to the right spot on the datalogger.

    I've found the datalogger very difficult to use. It seems to work okay once you get it setup properly and running, but getting it to work in the first place is the kicker. However, the service that it provides is invaluable, so that's why I still use it. Here are a couple of threads from when I was having problems.

    Thread 1
    Thread 2
  • MovieMakerMovieMaker Posts: 502
    edited 2008-10-30 12:21
    Dear SRLM,

    Thanks, I will read this.

    smile.gif
  • MovieMakerMovieMaker Posts: 502
    edited 2008-10-30 12:27
    After I read this, it is clear as mudd. I will go back and study some more. Thanks.
  • SRLMSRLM Posts: 5,045
    edited 2008-10-30 16:15
    I didn't say that it would help all that much... :|

    Anyway, I've found that I have to spend 1/3 to 1/2 of my time fiddling with the Datalogger, just trying different things and comparing it to the test code.
  • MovieMakerMovieMaker Posts: 502
    edited 2008-10-30 23:43
    Thanks SRLM. I will continue my journey. I will post if I succeed moreso. I can only get it to work 1/2 way now.
  • MovieMakerMovieMaker Posts: 502
    edited 2008-11-01 16:32
    Still trying desperately to get this to work. Now , my brain is going in circles. The documentation is unclear. It say certain pin goto certain things, but is it from or to on what chip?? Very confused!



    When I first started, with the suggestions on the forum, I got it to finally synchronize ,but that was it. It went further, but, now it is hung again. Please help!!!



    freaked.gif
  • MovieMakerMovieMaker Posts: 502
    edited 2008-11-01 16:58
    OK, I Think I know where the problem is comming from. But, I don't know how to fix it.

    The data logger asked for these pins to be assigned:

    1.· ground

    2.··RTS· Ready to Send

    3.· +5vdc

    4.· RXD Recieve Data

    5.· TXD Transmitt DATA

    6.· CTS· Clear to Send



    Now, on my· BS2px I have:

    1· Sout ( from Receive Data) RXD

    2. SIN· (from Transmitt DATA) TXD

    3. ATN (attention from DTR)



    But, there is no place to put·both pins CTS and RTS.



    Am I making myself· clear?·· At some point, it sorta worked, but I am dead in the water now.· I am·using the programs demo and test· and datalogger.bpx to test it with. I am changing the baud rate to the proper br.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-11-01 17:13
    If your test program is DataloggerTestV1.1.bs2 you will have to change the ' {$STAMP BS2} tag to ' {$STAMP BS2px}.· This program uses 9600baud.· With a BS2px, the 9600 baudmode value is 240 (not 84).

    You need to be careful when you remove the thumbdrive, you could corrupt the data and possibly its formatting.· So, heads up.

    The pins and connections are clearly presented in the Datalogger documentation as well as the "preamble" in the program (DataloggerTestV1.1.bs2):

    pin· 8 out
    pin· 9 out
    pin 10 in
    pin 11 in

    Post Edited (PJ Allen) : 11/1/2008 7:59:12 PM GMT
  • MovieMakerMovieMaker Posts: 502
    edited 2008-11-01 17:15
    Thanks P.J. I will try it.
  • SRLMSRLM Posts: 5,045
    edited 2008-11-01 17:15
    You have to set the wiring up exactly as it shows in the documentation. It won't work if you just change pins willy nilly. If you are short of pins, you'll have to make a choice on what you really want. There are ways to hook up the DL with fewer pins, but I have absolutely no idea how to program that. Best thing to do is to stick with the default. All that you are saving with the above is one pin: is it really worth it for all the headache?
  • MovieMakerMovieMaker Posts: 502
    edited 2008-11-01 17:28
    It seemed like the magic number was 396 instead of 240. I have got it back where it half-way works. It comes up with the error message: "Error reading the seed file" this is right after "random number=7618"

    Thank Both of you for your help.
  • MovieMakerMovieMaker Posts: 502
    edited 2008-11-01 17:28
    It seemed like the magic number was 396 instead of 240. I have got it back where it half-way works. It comes up with the error message: "Error reading the seed file" this is right after "random number=7618"

    Thank Both of you for your help.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-11-01 17:35
    Magic number?

    396 is 2400bps for a BS2.··396 is·not an established·value for a -2px, I'm sure that it works out to something, but, whatever.

    Post Edit -- Y'know, some of us have a hard time telling the -2sx color from the -2px color in the PBASIC Help.·

    Post Edited (PJ Allen) : 11/1/2008 7:58:37 PM GMT
  • MovieMakerMovieMaker Posts: 502
    edited 2008-11-01 17:37
    with all of this new information loaded. It runs and quits at the error message.
    I tried the other program the Demo one. It finds it, synchronizes it, then writes to the file and closes the file. Then opens the file. But, it stops when it cannot read back the data it wrote.

    I feel I am close.
  • MovieMakerMovieMaker Posts: 502
    edited 2008-11-01 18:14
    I tried the 240 speed and it did not get through synchronizing. But, I put the 396 back and it got past synchronizing.·
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2008-11-01 19:05
    So, 396 works out to 9600 baud on the BS2px and that is what you should stick with. The magic number 240 is for the BS2sx and BS2p.

    Moviemaker, in an earlier post today you menioned ATN (dtr). That pin should not be involved in the connection to the datalogger. Do you understand now how the connections have to match the ones in the programs? I sense confusion. Maybe the attached diagram would help, with pins corresponding to the test and demo programs.

    attachment.php?attachmentid=56529

    Edit1 be sure you follow the diagrams in the Parallax documentation carefully. For the record, I copy that here. Compare to the above diagram.
    Edit2: corrected the name of the stamp p11, now cts.

    attachment.php?attachmentid=56526

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com

    Post Edited (Tracy Allen) : 11/1/2008 8:33:23 PM GMT
    407 x 199 - 15K
    353 x 251 - 13K
  • MovieMakerMovieMaker Posts: 502
    edited 2008-11-01 19:31
    Thank You , so much. I will try this. I am confused right now. Thank you for being so kind as to reply to my question.

    I have it wired verbatim of the way it is in the book.

    I noticed that you had TWO· (9 and 11) going to rts. Is this right?

    Post Edited (MovieMaker) : 11/1/2008 7:37:21 PM GMT
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-11-01 19:38
    [noparse][[/noparse]I have the darndest time telling the two colors for those modules apart.]·

    Post Edit -- [noparse][[/noparse]Life is hard.· Like when your girlfriend says she has 'hazel' eyes and you think they're "...blue, or something?"· [noparse]:)[/noparse] ]

    Post Edited (PJ Allen) : 11/1/2008 8:01:35 PM GMT
  • MovieMakerMovieMaker Posts: 502
    edited 2008-11-01 19:59
    On the image attachment. Does the Black rectangle represent the stamp and the large rounded rectangle represent the datalogger? If so, I set it that way, but it doesn't work at all. I am going to try it in the reverse direction. Sorry to be such a pain.

    thanks again!
  • MovieMakerMovieMaker Posts: 502
    edited 2008-11-01 20:07
    This is the way that synchronizes, but has a random number error, works.

    TX PIN 8 ' Transmit Data --> 27937.4 (RXD)
    RTS PIN 9 ' Request To Send --> 27937.6 (CTS)
    RX PIN 10 ' Receive Data <-- 27937.5 (TXD)
    CTS PIN 11 ' Clear To Send <-- 27937.2 (RTS)

    with same settings, it opens up drive d: datalogger and writes to a file. But, when it reads, it cannot find anything.

    All other settings have not worked at all. They just get hung on synchronizing or initializing.

    Strange!
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-11-01 20:13
    Can you place that thumbdrive in a PC and still write and retrieve a file with it?· (Just wanted to make sure that it's still a good unit.)
  • MovieMakerMovieMaker Posts: 502
    edited 2008-11-01 20:24
    I took the thumb drive off the bot and placed it on the PC. I saw the file that I wrote to the PC earlier on the PC. But, I did not see the data that was written to the thumb drive. It showed that it wrote several bytes of data and then closed the file. But, when it tried to open and read the data, I get an error.

    I bought a second bot so I could be more compatible. I have taken a stock datalogger and wired everything verbatim the way the book says. The ONLY thing that is different is that I have a BS2px chip. I just wanted more capabilities. It seems it would work if I would wire it exactly how they say.

    Thanks P.J.
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2008-11-01 20:55
    Good observation. I went up an changed the diagram so that p11 on the stamp side is labeled CTS.

    Stamp p11 is CTS, which is an input that comes from the RTS output pin on the datalogger. Note in the software that TX\CTS always appear together in a SEROUT command to the datalogger. TX is the pin that the Stamp uses to transmit data to the datalogger, which receives it on its RXD pin. Just as complementary, RTS is an output from the datalogger to the CTS input on the Stamp, and it is the flow control signal that tells the Stamp that the data logger is ready to receive data. The RTS (datalogger) to CTS (stamp) connection will normally rest at a high level, because the datalogger is almost always ready to receive more data. It has an internal asynchronous serial buffer.

    Stamp p9 is RTS, which is an output that goes to the CTS input pin on the datalogger. Note in the software that RX\RTS always appear together in a SERIN command to receive data from the datalogger. Complementary again, RTS is an output from the Stamp to the CTS input on the datalogger, and it is the flow control signal that tells the datalogger that the Stamp is ready to receive data. The datalogger will not send data to the Stamp unless it finds that connection to be at a HIGH level. The RTS (stamp) to CTS (datalogger) connection will normally rest at a LOW level, because the Stamp is only ready to receive data when it is actually executing a SERIN command. There are conditions where your program may have to set RTS to a high level outside of a SERIN command, to fool the datalogger into thinking that the Stamp is ready to receive even though it isn't. And the RTS (stamp) to CTS (datalogger) flow control timing is not perfect, and problems can occur. But those are not issues that should concern you at all in making the Test and Demo programs work.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
Sign In or Register to comment.