Page 1 of 1

output to a file

PostPosted: Tue Aug 15, 2006 7:27 am
by piratemurray
hia

i would like my TI MSP430F169 to read data from a source, say a magnetic field, and then record this to the SD card on the CubeSat kit.

i've searched high and low and can't find any way to do this with Rowleys CrossWorks 1.3. Maybe i'm looking in the wrong places but a nudge in the right direction would do marvelously.

¬ is it something to do with _fprintf()?

in normal C i would just do the following:

code:

#include <iostream.h>
#include <fstream.h>
#include <threevector.h>
using namespace std;

...

int main(void)
{
ofstream outfile(results.txt);
threevector v0;
outfile << "some text";
v0.print(outfile);

...
}


clearly this doesnt work with crossworks.

i'd like to first print to a file and then try it out with the SD card if at all the procedure is different?

many thanx!


Re: output to a file

PostPosted: Tue Aug 15, 2006 10:47 am
by aek
Send me a private email and I'll email you a sampe project (not ours, it was done at UMich) that writes to SD card ...

------------------


Re: output to a file

PostPosted: Tue Jun 17, 2008 10:39 am
by Omair
We are trying to interface the SD card on the dev board to the MSP430 and implement a small Fat Filehandler onto it.
The problem I ran into is that the "CMD/DI pin 2" & "DAT0/D0 pin 7" of the SD card goes to "P3.2/SOMI0" & "P3.1/SIMO0/SDA" of
the processor respectively (both port 3 SPI), while the "Clock [SCK]" of the SD connects to "~ON=P4.5" of the MSP via a MAX890L switch.
First, am I reading it right?
Secondly, if that is true, would the generic SPI constrcuts [U0TXBUF = inBuf; wait for TX; U1TCTL &= ~TXEPT;] still work,
considering that the UCLK is not connected?
Any help is welcome.

[Mr Kalman, can you please send me that code from UMICH too.]

------------------
Omair A. Rahman,
USC Astronautics.


Re: output to a file

PostPosted: Tue Jun 17, 2008 10:49 am
by aek
We do not support the UMich code (please note the date) -- instead, the HCC-Embedded EFFS-Thin FFS is included in all modern CubeSat Kits.

Sample code that shows it working is in the ...SDSD1 project. This is for Rowley (because EFFS-THIN is supplied as a library in the CubeSat Kit).

If/when you get Salvo ported to mspgcc then we can look at compiling the EFFS-THIN code for mspgcc as well.

Also, look at http://www.pumpkininc.com/cubesat/private/doc/memo/memo-cubesatkit-design-for-I2C.pdf .

--Andrew

------------------


Re: output to a file

PostPosted: Tue Jun 17, 2008 10:51 am
by aek
And SCK does not go to P4.5 ... -ON_SD is a discrete signal.

------------------