Hairy Animal
Member
Hi,
I'm experimenting with logging data to the AT24C32 on a cheap DS1307 RTC board (controlled by an 08M2+) and having discovered lots of useful threads already (especially in the code snippets forum, thanks to all for those), it looks straightforward to do what I want.
In particular, I thought it would be useful in the future to be able to read the data back via the terminal/datalink, so I used the datalogger wizard to generate some vaguely appropriate code from which I can lift sections where appropriate, in particular the Datalink Transfer protocol from the end of the code.
When copied into my program though, it failed the syntax check initially on the "COM" in:
which of course was quickly fixed by copying:
to my symbols definitions. But then it failed again on the "CR" (and presumably will also on the "LF").
I quickly discovered that I can't define these as symbols, presumably because they're listed in picaxe_manual2.pdf as "Appendix 2 - Additional (non-command) reserved words".
The obvious instant work-around is just to replace all "LF"s with 10 and all "CR"s with 13, so no great problem there, but I'm puzzled that the logger wizard is generating code which requires that?
I'm using Picaxe Editor 6.0.6.2 (Beta) by the way, in case it's relevant.
Thanks to all for the continued support, and Happy New Year to all.
I'm experimenting with logging data to the AT24C32 on a cheap DS1307 RTC board (controlled by an 08M2+) and having discovered lots of useful threads already (especially in the code snippets forum, thanks to all for those), it looks straightforward to do what I want.
In particular, I thought it would be useful in the future to be able to read the data back via the terminal/datalink, so I used the datalogger wizard to generate some vaguely appropriate code from which I can lift sections where appropriate, in particular the Datalink Transfer protocol from the end of the code.
When copied into my program though, it failed the syntax check initially on the "COM" in:
Code:
serout B.7, N4800, ( "Address",COM,"Light",CR,LF )
Code:
symbol COM = 44 ; comma
I quickly discovered that I can't define these as symbols, presumably because they're listed in picaxe_manual2.pdf as "Appendix 2 - Additional (non-command) reserved words".
The obvious instant work-around is just to replace all "LF"s with 10 and all "CR"s with 13, so no great problem there, but I'm puzzled that the logger wizard is generating code which requires that?
I'm using Picaxe Editor 6.0.6.2 (Beta) by the way, in case it's relevant.
Thanks to all for the continued support, and Happy New Year to all.