Datalogger issue
TCP71
Posts: 38
I have the USB datalogger (#27937) attached to my prop via the SPI connections (with 1k resistors in the 4 data/control) lines. When I power up the board, the red and green LEDs flash for a second or two, then stop. This seems to be the regular boot sequence. After that it does nothing. It doesn't react when a stick is inserted, when I attempt to access it from the prop in any way. I've confirmed the pinouts are in the correct for SPI Mode, the jumper is set for SPI and the unit has clean 5V power. My code is below. Could it be a firmware issue on the datalogger board? Why wouldn't it even light up the LED when the stick is inserted? The Stick I'm using has been used with the datalogger previously in UART mode, so seems to be compatible. Again, any help or suggestions appreciated.
Pertinent Code:
Pertinent Code:
CON _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 LoggerSDO = 0 'Datalogger Data out pin LoggerSDI = 1 'Datalogger Data in pin LoggerCLK = 2 'Datalogger Clock pin LoggerCS = 3 'Datalogger Chip Select pin OBJ Log : "DataloggerSPI" Pub init pst.start(115_200) P2P.start(Data1Rx, Data2Tx, 0, 19200) 'Set up communication between props Card.FatEngineStart(CardSDO, CardCLK, CardSDI, CardCS,-1,-1,-1,-1,-1) 'Set up Card functions Log.DataloggerSPI(LoggerCS, LoggerCLK, LoggerSDI, LoggerSDO) 'Start Datalogger Pub DumpUSB | CC repeat CC := P2P.rxcheck log.receivePromptOrError(2000) ' get unsollicited message from datalogger if log.diskPresent pst.str(string("Disk recognized")) pst.char($0D) P2P.tx("P") StickIn := "P" quit else pst.str(string("No disk present.")) pst.char($0D) waitcnt(clkfreq+cnt) 'wait 1 second P2P.tx("N") if CC == "Q" pst.str(string("Quitting Stick")) pst.char($0D) quit waitcnt(clkfreq*4 + cnt)
Comments
please take a look into this thread which explains how post code and keeping the indention and displaying the code in a constant size font
http://forums.parallax.com/showthread.php?129690&p=978076&viewfull=1#post9780%2076
best regards
Stefan
Here are some notes from when I was using the datalogger and having troubles:
1) Jumper Setting
2) Pinout:
2 SDO Serial Data Output
3 Vdd Connects to +5V (Regulated)
4 SDI Serial Data Input
5 SCLK Serial Clock Input (12 MHz Max)
6 CS Chip Select Input
7 NC No Connection
8 NC No Connection
4) Verify Power On LED sequence:
alternately for 2 seconds Repeated
until monitor connects
Good luck!