TSL1401 & MoBoStamp-pe text file output
mclparker
Posts: 15
Hi all,
I'm struggling with trying to get a text file output from my MoBoStamp-pe with TSL1401 pixel number and volts bit value. I am running windows xp pro on a dell t3400.
Can anyone help out this inexperienced programmer with hints or code examples.?
Thank you,
mike
I'm struggling with trying to get a text file output from my MoBoStamp-pe with TSL1401 pixel number and volts bit value. I am running windows xp pro on a dell t3400.
Can anyone help out this inexperienced programmer with hints or code examples.?
Thank you,
mike
Comments
What have you tried so far, and what problems has it presented?
-Phil
I was hoping you would find this post. Thank you for taking the time to respond.
Actually, I have not tried anything except:
a] hooking everything up and playing with the tsl1401 monitor program
b] reading the basic stamp programming material [including a bunch of your material] that I downloaded for the tsl1401 & mobo.
I am old fortran/basic dude so i was looking for a "write command" and could not find it or anything similiar.
I am [hopefully] going to use the tsl1401 & mobo for an inexpensive spectrometer I'm building.
Via cheap optics, I beam various LEDs to a grating and then to the tsl1401. I liked your clever stacking scheme (TSL1401-DB document) so I plan to use it.
My objective for mobo is for it to beam a text file with pixel number, pixel volts, pixel line number, and a time stamp to my puter.
From that text file I can then use some math to get me what I'm really after...wavelength Vs. amplitude.
I think all I need is for someone to point me at the commands that do these operations. Code snippet examples would be a delightful surprise.
mike
Look up SEROUT and DEBUG in your PBASIC manual for info on outputting data to your computer. I would recommend using the fastest possible baud rate (38,400) and the absolute briefest data format (raw binary or hex) for transmitting pixel data to the PC. Forget sending a timestamp and pixel numbers: your PC program can fill that in. The reason I say this is that grayscale pixel data are received from the AVR as they're being clocked out from the sensor. You don't want to slow this process down by interspersing it with wordy ASCII. Otherwise, you risk the "pixel droop" phenomenon explained in the TSL1401-DB manual.
Good luck with your project. It sounds like an interesting one!
-Phil
At the expense of trying your patience, I have a related question. I read your material on Pseudo-analog Pixel Acquisition. I can stumble through the basic stamp code...but I don't know the limits of the stamp memory. Is there a way [tricky or otherwise] to get analog volts out for each pixel in a single cycle?
mike
If you're using the MoBo, you don't need to go through that rigamarole. The TSL1401 AVR firmware does the A-to-D conversion for you. You just need to load the firmware into the AVR using the LoadAVR program downloadable from Parallax and follow the examples in the TSL1401-DB documentation. Neither the BS2pe nor the AVR have enough RAM to hold an entire gray-level scan at once. That's why I suggested that you need to get the data out to the PC as fast as possible as it's being read out of the sensor via the AVR.
-Phil
Thank you again Phil,
I don't know if I am lame or what, but I cannot find any discussion or code examples on how to send TSL1401-DB (using 2pe mobo) voltage data to a data file [e.g., volts.dat] on my computer. All the examples send the data to the screen monitor. Help!
Also, Phil, what is supposed to be done with TSL1401_DB connectors (J1 & J2)? I can't find any discussion in your user manual for the 1401 db.
Thank you again for any help you can give me.
mike
J1 is an accessory socket. As yet, there are no accessories available for it. J2 can be jumpered to provide a triggering pulse (e.g. for a strobe) to another daughterboard plugged into the MoBo.
-Phil