Pumpkin, Inc.

Pumpkin User Forums

output to a file

If you can't make Salvo do what you want it to do, post it here.

output to a file

Postby piratemurray » Tue Aug 15, 2006 7:27 am

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!

piratemurray
 
Posts: 16
Joined: Mon Jul 03, 2006 11:00 pm
Location: london

Re: output to a file

Postby aek » Tue Aug 15, 2006 10:47 am

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 ...

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

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: output to a file

Postby Omair » Tue Jun 17, 2008 10:39 am

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.

Omair A. Rahman,
USC Astronautics.
Omair
 
Posts: 2
Joined: Wed Jun 04, 2008 11:00 pm
Location: Los Angeles, CA, USA

Re: output to a file

Postby aek » Tue Jun 17, 2008 10:49 am

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

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

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: output to a file

Postby aek » Tue Jun 17, 2008 10:51 am

And SCK does not go to P4.5 ... -ON_SD is a discrete signal.

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

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm


Return to Coding

Who is online

Users browsing this forum: No registered users and 2 guests

cron