Difference between revisions of "MSP430 Datalogger"

From DIDEAS Wiki
Jump to: navigation, search
m (My Tools Setup)
 
(81 intermediate revisions by 4 users not shown)
Line 1: Line 1:
==Support Software / Hardware==
+
[[Main Page]]
* C compiler and JTAG tools : http://mspgcc.sourceforge.net/
 
* "Adapt3" USB drivers : http://www.ftdichip.com/Drivers/FT232-FT245Drivers.htm
 
* PC Hardware clock synchronization : http://www.thinkman.com/dimension4/download.htm
 
* Parallel port J-TAG cable : http://www.olimex.com/dev/msp-jtag.html
 
* Windows sync utility (eject) : (UNVERIFIED) http://www.only4gurus.com/v3/download.asp?ID=2443
 
* Sync http://gnuwin32.sourceforge.net/packages/coreutils.htm
 
* sync from cygwin works
 
  
 +
=[[Datalogger Setup]]=
 +
Discussion of preparing the laboratory PC for working with the datalogger.
  
 +
[[Image:datalog.jpg|right|thumb|160px|SD LOG]]
  
==Software and Tools Setup==
+
=[[Datalogger Use | Laboratory use of the Datalogger]]=
*Install [http://mspgcc.sourceforge.net/ MSP430-GCC].  Download [http://sourceforge.net/project/showfiles.php?group_id=42303&package_id=68584 Win32 version] or [http://sourceforge.net/project/showfiles.php?group_id=42303 Others]
 
  
*Optionally install [http://www.ftdichip.com/Drivers/FT232-FT245Drivers.htm USB drivers] for Adapt3
+
Discussion of programming the datalogger, preparing the SD card, etc.
  
*Download and extract source code for the datalogger.  Humm where is this!
+
=[[Datalogger Field | Field use of the Datalogger]]=
  
==My Tools Setup==
+
=Information and Specs=
http://www.dideas.com/docs/datalogger
+
*[http://www.sandisk.com/oem/default.asp Sandisk OEM info for SD and MMC]
*jtag_clock
 
*genfile
 
*sd_translate
 
*reset
 
  
==Hardware Setup for MSP430 Programming==
+
*[http://www.dideas.com/docs/datalogger/datasheet/ Datasheets and application notes]
  
*Connect the JTAG cable to the PC printer board and to the "Adapt3" PCB.  The JTAG cable is polarized to help connect it properly.
+
*[[DS1339 Discussion]]
  
*Optionally connect "Adapt3" to the PC via the USB cable (you many need to install drivers). USB will provide power to the board - however the parallel port can also do this (but may not be relable).  This USB interface is also used for debugging.
+
=[[DL6F Issues]]=
  
*Connect the 1.5mm cable (10 pins) to the "Adapt3" PCB and to the datalogger board requring programming.
+
Known problems with the DL6F design and workarounds
  
==Programming the Datalogger==
+
=[[SD / MMC Requirements and Test Results]]=
* Complete the software and hardware setup
 
* From the datalogger source code directory, build the package by typing "make download".  Thats it!
 
  
 +
Results of various SD and MMC cards.
  
 +
=[[DL6F delivery | Delivered and Status]]=
  
 +
Dates of deliveries and project status.
  
 +
=[[DL6F Assembly | Assembly Documentation]]=
  
==SD Card Preperation==
+
Bill of materials and assembly documentation
 
 
The SD Card preperation is essentualy a process of wiping the card with a known value and to create a single sequenetial file in the cards root directory.
 
 
 
The following information was created and verified using Windows 2000 SP4.
 
 
 
Format card using FAT16 and largest allowable cluster size:
 
 
 
 
 
format <drive_letter> /FS:FAT /A:16K /V:
 
 
 
 
 
A cluster size of 16K was the largest permited with the SD 128MB card.  Possibly a smaller cluster size will need to be used with a smaller SD card.  (Large cluster size means that FAT is smaller (which isn't used anyway)  - and thus more space is avaialble for logging)
 
 
 
 
 
If format doesn't report the drive size, use chkdsk <drive letter> to deterime the size of the SD card.  The card size is reported in bytes, but then may also be given in "allocation units".  If so - record the allocation units and the cluster size.
 
 
 
 
 
Use "genfile" to write a file named "timing00.bin" that fills the SD card.  This binary file contains a single value (0xFF) and is designed to overwrite previous data on the card and most importantly to cause windows to create a single FAT file chain the starts with cluster 2, 3, 4, 5, ..., last available cluster.
 
 
 
 
 
Example : genfile n:timing00.bin 7666C 0xff 16k
 
 
 
Finally before removing the SD card, flush file system buffers.  You can use the cygwin "sync" command, or rom explorer, right click on the drive letter representing the SD card, and select eject. 
 
 
 
===Shorting the preperation proceedure===
 
Format and genfile can take several minutes to complete for a large card. 
 
 
 
When "wiping" the card, the proceedure may be shortened if you know that only small portion of the card has been overwritten.  For example its not necessary to reformat the card every time, nor is it necessary to use genfile to fill the entire card.  However, it is nessary to format and fill the enire card before the first use.
 
 
 
=== How the datalogger chooses where to write data on the SD card ===
 
The datalogger only consults the SD card's FAT when the card is inserted and thus does not modify the FAT or follow it.  At insertion the partition table, boot record, and root directy are analyzed ultimatly to find the cluster number of a single file "datalog0.txt".  If the file doesn't exist then the logger stops and waits for a card insertion event.  If the file is found then the starting cluster is read and from that the LBA (logical block address) of the start of the file is calculated. The datalogger will then using a binary search algorithm searching the card's complete data area to locate "end of file". End of file is define as the last sector that does NOT start with 4 bytes of 0xFF.  Writing will comence with the first LBA that does contain 0xFFFFFFFF.
 

Latest revision as of 19:31, 9 August 2006

Main Page

Datalogger Setup

Discussion of preparing the laboratory PC for working with the datalogger.

SD LOG

Laboratory use of the Datalogger

Discussion of programming the datalogger, preparing the SD card, etc.

Field use of the Datalogger

Information and Specs

DL6F Issues

Known problems with the DL6F design and workarounds

SD / MMC Requirements and Test Results

Results of various SD and MMC cards.

Delivered and Status

Dates of deliveries and project status.

Assembly Documentation

Bill of materials and assembly documentation