ds1307 clock w/ jm_ds1307_demo.spin
stargazer2050
Posts: 89
Ds1307 board from sparkfun
Quickstart board
Need fullduplexserial.spin
Jm_ds1307_demo.spin
5v, 4.7k pullups to 3.3v
Clock is running.
Took the apostraphe off of setclock at startup.
Clock sets, how to set todays time into it?
"copy block at pntr".....? Cant make out what that means.
So i guess i just need to know how to use this spin file better
Quickstart board
Need fullduplexserial.spin
Jm_ds1307_demo.spin
5v, 4.7k pullups to 3.3v
Clock is running.
Took the apostraphe off of setclock at startup.
Clock sets, how to set todays time into it?
"copy block at pntr".....? Cant make out what that means.
So i guess i just need to know how to use this spin file better
Comments
Clock is working, the demo uses, full duplex and a i2c driver.
Just need instruction on file usage to set the clock.
Ive tried a bunch of other software but each either doesnt work the clock, or the use vga, lcd, or mirror duplex.
Or sda and clk are set on 28 and 29 which are somewhere else on quickstart header.
Need code pasting instructions
Need file attachment instruction
As you know, I'm not averse to helping out or even testing software on my own setup.
But I am too lazy to search for an object myself.
Here's a link. It looks like it was attached to some forum post.
I have a link to a tutorial by Phil on how to post code in post #3 of my index.
Darn my lack of laziness. Here's the link.
Code Pasting Instructions
The main method used "getclock" to read the values from the RTC and store them in the "clock" array with this command.
It keeps doing this until the seconds value has changed.
Since "RTC_SECS" has been set to zero in the constant section, it's save to assume "clock[0]" holds the seconds.
Once the seconds value no longer matches its previous value the program displays the new time.
The "@" symbol is used to indicate a memory address rather then the value stored at that address. Passing an address is way of passing (or receiving) multiple parameters at once.
Do you just want to set the RTC?
You need to put your current time and date data after Preset
PreSet byte seconds, minutes, hours, day of week, day, month, year, 0
Then put the apostrophe back in front of the setclock call so you won't keep loading the old data each time it runs.