USB datalogger and SX
I'm woring on building a data aquisition system for and RC car using the SX and the Parallax·memorystick datalogger.· I've got everything working well except talking to the memory stick.· I can't get the serial communications to work, nor can I find any information·
.· The device is the Parallax USB datallogger (#27937) that uses the Vinculum chip.
Question:· Has anyone used the memory stick datalogger with the SX?· If so, do you have an example of your code I could look at to get me going?· Even the BS2 examples converted to SX (which I've tried and failed) would be helpfull.· If I can get the interface working I can go from there.
Thanks for your help!·
![shakehead.gif](http://forums.parallax.com/images/smilies/shakehead.gif)
Question:· Has anyone used the memory stick datalogger with the SX?· If so, do you have an example of your code I could look at to get me going?· Even the BS2 examples converted to SX (which I've tried and failed) would be helpfull.· If I can get the interface working I can go from there.
Thanks for your help!·
Comments
If you post you code we could maybe see why it's not working.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Did you know that 111,111,111 multiplied by 111,111,111 equals 12345678987654321 ?
www.iElectronicDesigns.com
·
With this I can get the light on the USB drive to flash:
Write:
··revdata = __PARAM1
· SHIFTOUT Dpin, Cpin, MSBFIRST, revdata, 10
· PULSOUT Latch, 1
· RETURN
I'm pretty sure that the the above is wrong and it should be something like below, but I cannot make anything happen this way.· I think the device needs to use the flow control input, but the SEROUT doesn't allow you to as far as I can tell.· Baud=9600 and counter is a VAR byte
Write:
··revdata = __PARAM1
· PAUSE 100
· SEROUT TX, Baud, revdata
Return
I know the first thing I need to do is create a file named "blablabla.txt", open the file then write to it, but I can't get past this step.
Thanks for your help!·
Try the code I have attached.
P.S. You cannot use the internal oscillator with SERIN and SEROUT is not accurate enough. This may be the problem.
If your DEVICE line has OSC4MHZ then the code won't work. You need to use a resonator.
Bean.
[noparse][[/noparse]edit] Removed code. Posted revised code further down.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Did you know that 111,111,111 multiplied by 111,111,111 equals 12345678987654321 ?
www.iElectronicDesigns.com
Post Edited (Bean (Hitt Consulting)) : 4/25/2008 11:37:04 AM GMT
I hooked it back up to my BS2 and it works flawlessly there.· Any other ideas?· I'm starting to think i have a device problem since my code and your proven code doesn't work
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Did you know that 111,111,111 multiplied by 111,111,111 equals 12345678987654321 ?
www.iElectronicDesigns.com
·
· I made a few small changes and added some comments about the connection.
· *** Note that RX on the SX connects to TXD on the datalogger, and so forth for all the connections.
· I have tried this code and it does work.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Did you know that 111,111,111 multiplied by 111,111,111 equals 12345678987654321 ?
www.iElectronicDesigns.com