EDIT 4/21/10 - Don Jackson at R4 Systems put me on to a glitch in the example code. It seems I have to add a line, "LCDINIT etc" before the first "LCDWRITE etc". I thought the LCDINIT command was an AtomPro-only thing. Wrong-o!

I was having problems getting the LCD to start properly without power cycling (OFF/ON) the board first thing after programming. I thought this was a local phenomenon, but, no, I glitched. The example code is now fixed.
EDIT 4/25/10 - BasicMicro has added the capability of downloading several new file types. I decided to try to upload the .BAS file for the code. Try downloading it and see if it starts up in Studio without problems.
This is a five page PDF guiding you through the use of a Dallas Semiconductor DS1307 Real Time Clock chip with the Atom and Nano parts. There's another version of this for Atom Pros because of the differences in LCD command syntax. It's I2C, so only two wires are needed, and be sure to use the pullup resistors.
I make all the usual disclamers about fitness and usability for this in a commercial application. This is provided for students and aspiring hobbyists. I can't hope to anticipate every possible application or users' skill level.
There is one warning: After you copy and paste the code I provide into the Studio IDE, you'll have to perform some work on it before it will compile and program. All the quote marks (' " " ') have to be deleted and re-entered. I can't say why, nor know how to avoid it. I'm open to suggestion or explanation.
Enjoy.
Attachment:
Attachment:
ds1307 code_042510a.bas [2.73 KiB]
Downloaded 156 times