BasicMicroUK - Forums
It is currently Sat Feb 16, 2019 8:30 pm

All times are UTC [ DST ]

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: App Note: Using the DS1307 RTC IC with Atoms and Nanos EDIT!
PostPosted: Fri Apr 09, 2010 7:42 am 

Joined: Mon Aug 18, 2008 1:26 am
Posts: 799
Location: CA bay Area
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! :mrgreen: 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.
App Note - DS1307 Use With AtomICs_EDIT.pdf [27.84 KiB]
Downloaded 1922 times

ds1307 code_042510a.bas [2.73 KiB]
Downloaded 607 times


Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group