Logomatic Works!!!
Hi All,
I received my Logomatic (referred to earlier in this thread), read the instructions carefully, sent off an enquiry to Sparkfun, and read the guff on the Serout command, and the interfacing circuits in the Picaxe manual re serial communications.
After some experimentation the serout command worked, with "T" rather than "N" . Something to do with the thing having an inbuilt UART in its little NXP LCP2138 chip. All i did was follow the instructions and changed the default speed from 9600 to 2400 by changing one integer in the configuration file on the SD card, which must have already been set to FAT 16 (512 MB card).
Code:
serout 7,T2400,("Boom, ",#boom," ,Temp, ",#temp_byte," ,DP, ",#data3,13,10)
where boom, temp_byte, and data3 were pre defined byte variables.
This code gives me a text file with commas in between the data.
To read and manipulate the file i insert the card into a SD-USB card reader, go into Microsoft Excel (2003), File Open, Go to the SD card reader, select "ALL files" then open the text file. The Excel wizard then detects that is a delimited file, and i then follow the prompt for comma delimited. Then I have a nice excel file that i can manipulate to my hearts content, make pretty graphs, averages, sort data eliminate outliers statistically. An environment much more familiar to me than the world of microprocessor programming!
My electrical connection for this is as per the Voltage divider in The AXE 110 Data logging module and the XBEE connect, i.e the 5V output of the Picaxe is reduced to 3.3V with a 10k/22Kvoltage divider. The CPU of this little thing runs on 3.3V. I don't know if i really had to do this, the Data sheet for the LCP2138, which says the 47 input pins are "5V tolerant" whatever that means. (comments?) But i didn't want the thing cooking like my 28X1 did when i put 12V on the adc input.
So, as per photos, there are only three wires connecting the Picaxe to the Logomatic, Ground, +5v, and the output pin, in this case out7 on the 18X, via the voltage divider.
Sorry about the connectors, that's all i had! You've seen this board in a previous thread, driving an I2C display which i've now mastered, but it now has its own 5V power supply and a few 100nf capacitors as well.
I may end up controlling more, i.e there is a "stop recording" button that can be accessed on the board, and it "starts recording" to a new file when it is switched on. I can do that with a couple of transistors controlled by the Picaxe. It seems you don't need the RS232 interface for the logomatic that Sparkfun suggest.
I guess all that SPI and buffer stuff (other thread) is being handled by the logomatic, which is great, because that is a mystery area for me, and it seems not without interfacing problems. If all i need is one Serout command and to switch the thing off and on, that's what i want and it's worth the money.
Michael