fireactionplan
New Member
Hi everyone,
This is my first time posting anything as I am a newbie when it comes to picaxe, but I have read through all of the forum posts on this topic for help with this and have tried various iterations of code that has been suggested there but still cannot get this to work, and apparently it's an easy way to log to a uSD according to many? Well not to me.
I am almost finished my project but am relying on this to complete it to log my required data, so would really appreciate the help.
I am using a 40x2 chip with the OpenLog uSD module. I have connected the OpenLog to the pic from RXI to pin C.6 (hserout), TXI to pin C.7(hserin) and connected VCC to 5VDC and the GND and BLK pins to 0V.
I placed the CONFIG.TXT file on the card before use (9600,26,3,0,1,1,0).
And I have written some code to try and get it working, based on the parameters i need before merging it with my main code:
I have also tried swapping C.6 and C.7 in my code, and also switching the wires but with no luck either. My .CSV file is not being generated on the card at all.
I can get an output to the picaxe terminal, and all of my data is appearing there and can export that .CSV to excell to display the values. But I just cannot get the uSD card module to work.
There are 2 LED's on the module (green and blue) but they do not seem to light up at all, and I have checked with a multimeter that the module is receiving 5V which it is. Perhaps this is just a faulty unit?
If anyone has any suggestions on where I might have went wrong, or can point me in the right direction that would be great. As I mentioned, I am very new to picaxe but have been picking it up very fast and making good progress, until I hit this wall!
Thanks in advance
Ross
This is my first time posting anything as I am a newbie when it comes to picaxe, but I have read through all of the forum posts on this topic for help with this and have tried various iterations of code that has been suggested there but still cannot get this to work, and apparently it's an easy way to log to a uSD according to many? Well not to me.
I am almost finished my project but am relying on this to complete it to log my required data, so would really appreciate the help.
I am using a 40x2 chip with the OpenLog uSD module. I have connected the OpenLog to the pic from RXI to pin C.6 (hserout), TXI to pin C.7(hserin) and connected VCC to 5VDC and the GND and BLK pins to 0V.
I placed the CONFIG.TXT file on the card before use (9600,26,3,0,1,1,0).
And I have written some code to try and get it working, based on the parameters i need before merging it with my main code:
Code:
[color=Black]DEMO_FIGURES:[/color]
[color=Blue]LET [/color][color=Purple]B0[/color][color=DarkCyan]=[/color][color=Navy]0 [/color][color=Green]'USER - CAPTAIN[/color]
[color=Blue]LET [/color][color=Purple]B1[/color][color=DarkCyan]=[/color][color=Navy]1[/color]
[color=Blue]LET [/color][color=Purple]B40[/color][color=DarkCyan]=[/color][color=Navy]1 [/color][color=Green]'TIME HH:MM:SS[/color]
[color=Blue]LET [/color][color=Purple]B41[/color][color=DarkCyan]=[/color][color=Navy]3[/color]
[color=Blue]LET [/color][color=Purple]B38[/color][color=DarkCyan]=[/color][color=Navy]2[/color]
[color=Blue]LET [/color][color=Purple]B39[/color][color=DarkCyan]=[/color][color=Navy]0[/color]
[color=Blue]LET [/color][color=Purple]B48[/color][color=DarkCyan]=[/color][color=Navy]5[/color]
[color=Blue]LET [/color][color=Purple]B49[/color][color=DarkCyan]=[/color][color=Navy]9[/color]
[color=Blue]LET [/color][color=Purple]B42[/color][color=DarkCyan]=[/color][color=Navy]1 [/color][color=Green]'DATE DD/MM/YY[/color]
[color=Blue]LET [/color][color=Purple]B43[/color][color=DarkCyan]=[/color][color=Navy]9[/color]
[color=Blue]LET [/color][color=Purple]B44[/color][color=DarkCyan]=[/color][color=Navy]0[/color]
[color=Blue]LET [/color][color=Purple]B45[/color][color=DarkCyan]=[/color][color=Navy]2[/color]
[color=Blue]LET [/color][color=Purple]B46[/color][color=DarkCyan]=[/color][color=Navy]1[/color]
[color=Blue]LET [/color][color=Purple]B47[/color][color=DarkCyan]=[/color][color=Navy]8[/color]
[color=Blue]LET [/color][color=Purple]B16[/color][color=DarkCyan]=[/color][color=Navy]0 [/color][color=Green]'ALCOHOL X.XX MG/L[/color]
[color=Blue]LET [/color][color=Purple]B17[/color][color=DarkCyan]=[/color][color=Navy]5[/color]
[color=Blue]LET [/color][color=Purple]B18[/color][color=DarkCyan]=[/color][color=Navy]6[/color]
[color=Blue]LET [/color][color=Purple]B19[/color][color=DarkCyan]=[/color][color=Navy]1 [/color][color=Green]'HIGH FLAG (1/0)
'USE POKE AND PEEK IN FINAL CODE [/color]
[color=Blue]PAUSE [/color][color=Navy]1000
[/color]
[color=Black]DL_INIT:[/color]
[color=Blue]SETFREQ M8
SYMBOL [/color][color=Black]CTZ[/color][color=DarkCyan]=[/color][color=Navy]26 [/color][color=Green]' SET COMMANDS[/color]
[color=Blue]SYMBOL [/color][color=Black]COM[/color][color=DarkCyan]=[/color][color=Navy]44[/color]
[color=Blue]PAUSE [/color][color=Navy]100[/color]
[color=Blue]HIGH C.7
PAUSE [/color][color=Navy]500[/color]
[color=Blue]SEROUT C.6[/color][color=Black], [/color][color=Blue]T9600_8[/color][color=Black], [/color][color=Blue]([/color][color=Black]CTZ,CTZ,CTZ[/color][color=Blue]) [/color][color=Green]'FORCE COMMAND MODE FOR DATA LOGGER
'PAUSE 100
'SERIN C.7, N4800, (">") 'WAIT FOR COMMAND PROMPT
'SEROUT C.7, T9600_8, ("NEW BAAMS.CSV",CR) 'CREATES NEW BAAMS FILE[/color]
[color=Blue]PAUSE [/color][color=Navy]1000[/color]
[color=Blue]SEROUT C.6[/color][color=Black], [/color][color=Blue]T9600_8[/color][color=Black], [/color][color=Blue]([/color][color=Red]"APPEND BAAMS.CSV"[/color][color=Black],[/color][color=Blue]CR) [/color][color=Green]'INSTRUCTION TO APPEND .CSV FILE. NEW DATA IS APPENDED TO END OF FILE. CHANGE BAAMS TO DATAFILE IF REQUIRED[/color]
[color=Blue]PAUSE [/color][color=Navy]2000[/color]
[color=Blue]SEROUT C.6[/color][color=Black], [/color][color=Blue]T9600_8[/color][color=Black], [/color][color=Blue](CR[/color][color=Black],[/color][color=Blue]LF[/color][color=Black],[/color][color=Red]"NEW SAMPLE PROVIDED"[/color][color=Black],[/color][color=Blue]CR[/color][color=Black],[/color][color=Blue]LF) [/color][color=Green]' CREATE CSV COLUMN HEADINGS[/color]
[color=Blue]SEROUT C.6[/color][color=Black], [/color][color=Blue]T9600_8[/color][color=Black], [/color][color=Blue]([/color][color=Red]"USER"[/color][color=Black], COM, [/color][color=Red]"TIME"[/color][color=Black], COM, [/color][color=Red]"DATE"[/color][color=Black], COM, [/color][color=Red]"BREATH ALCOHOL mg/L"[/color][color=Black], COM, [/color][color=Red]"HIGH FLAG"[/color][color=Black], [/color][color=Blue]CR[/color][color=Black],[/color][color=Blue]LF)
PAUSE [/color][color=Navy]100[/color]
[color=Black]DL_LOGGING:[/color]
[color=Blue]LOW D.5
PAUSE [/color][color=Navy]100[/color]
[color=Blue]SEROUT C.6[/color][color=Black], [/color][color=Blue]T9600_8[/color][color=Black], [/color][color=Blue]([/color][color=Black]#[/color][color=Purple]B0[/color][color=Black],#[/color][color=Purple]B1[/color][color=Black],COM,#[/color][color=Purple]B40[/color][color=Black],#[/color][color=Purple]B41[/color][color=Black],[/color][color=Red]":"[/color][color=Black],#[/color][color=Purple]B38[/color][color=Black],#[/color][color=Purple]B39[/color][color=Black],[/color][color=Red]":"[/color][color=Black],#[/color][color=Purple]B48[/color][color=Black],#[/color][color=Purple]B49[/color][color=Black],COM,#[/color][color=Purple]B42[/color][color=Black],#[/color][color=Purple]B43[/color][color=Black],[/color][color=Red]"/"[/color][color=Black],#[/color][color=Purple]B44[/color][color=Black],#[/color][color=Purple]B45[/color][color=Black],[/color][color=Red]"/"[/color][color=Black],#[/color][color=Purple]B46[/color][color=Black],#[/color][color=Purple]B47[/color][color=Black],COM,#[/color][color=Purple]B16[/color][color=Black],[/color][color=Red]"."[/color][color=Black],#[/color][color=Purple]B17[/color][color=Black],#[/color][color=Purple]B18[/color][color=Black],COM,#[/color][color=Purple]B19[/color][color=Black],[/color][color=Blue]CR[/color][color=Black],[/color][color=Blue]LF)
PAUSE [/color][color=Navy]2000[/color]
[color=Blue]HIGH D.5 [/color][color=Green]'LED TO SHOW DATA LOGGED[/color]
[color=Blue]PAUSE [/color][color=Navy]3000[/color]
[color=Blue]GOTO [/color][color=Black]DL_LOGGING[/color]
I have also tried swapping C.6 and C.7 in my code, and also switching the wires but with no luck either. My .CSV file is not being generated on the card at all.
I can get an output to the picaxe terminal, and all of my data is appearing there and can export that .CSV to excell to display the values. But I just cannot get the uSD card module to work.
There are 2 LED's on the module (green and blue) but they do not seem to light up at all, and I have checked with a multimeter that the module is receiving 5V which it is. Perhaps this is just a faulty unit?
If anyone has any suggestions on where I might have went wrong, or can point me in the right direction that would be great. As I mentioned, I am very new to picaxe but have been picking it up very fast and making good progress, until I hit this wall!
Thanks in advance
Ross