In SX Microcontrollers, SX/B Compiler and SX-Key Tool, John Kauffman wrote: SX/B and Hitt Data Logger I've incorporated your suggestions (I think) but am still getting: - no file written to the SD card - no logger active light on I've tried with Murata 400CM625 resonator and FREQ=4_000_000 I've also switched to Murata 50 resonator and freq of 50M. Logger works fine in BS2. This program is stripped down to try to focus on what is wrong to create a file. My guesses on problems: Pacing command & value not sent correctly? Baud setting on SEROUT? Much thanks. ' ----------------------------------------------- ' Device Settings ' ----------------------------------------------- ' external resonator Murata "50.00" DEVICE SX28, OSCXT1, TURBO, STACKX, OPTIONX FREQ 50_000_000 '-------- IO Pins ' data logger jumper OFF for 2400 Spin pin RA.0 ' Serial Pin ' Variables tmpW1 var word tmpB1 var byte counter var byte '-------- Subroutines / Jump Table TX_BYTE sub 1 'has parameters so don't use "GoSub" TX_STR sub 2 ' a string as follows ' TX_Str takes a string in quotes (minimum 2 char) ' TX_Str takes a string in DATA with a 0 terminator '================================================ PROGRAM Start '================================================ Start: '-------- Program Code Main: LOW SPin ' Start with serial pin low PAUSE 1000 ' Allow device to stabilize TX_Str "xxx!WU" ' Wake Up TX_Str "xxx!PV30" ' Set pacing TX_Str "xxx!CF" ' Close file (in case open) TX_Str "xxx!OFDATA01.CSV" ' Open file "DATA01.CSV" TX_Str "xxx!ASHeadings" ' Append col headings For counter = 1 to 100 'append some test values Tx_str "xxx!AS" Tx_byte counter Tx_str "CRLF" next TX_Str "xxx!CF" ' Close File TX_Str "xxx!SL" ' Put module into Sleep Mode end ' ------- Subs --------------------------- sub TX_BYTE SEROUT Spin, N2400, __PARAM1 endsub SUB TX_STR tmpW1 = __WPARAM12 DO READINC tmpW1, tmpB1 IF tmpB1 = 0 THEN EXIT TX_BYTE tmpB1 LOOP ENDSUB ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=258120#m259839 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)