DS 1337 RTC INETRFACING

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hi all,
any one of have interfaced ds1337 RTC,please send me code of it.as it is very urgent for us.

regards
sudhakar

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Sudhakar,
Found a message you posted last september and i'm in the same situation now!
So if you have managed to interfaced ds1337 RTC then please reply.

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello!!!
ds1337 compatable with ds1307.
I use ds1307 driver (CodeVision AVR) with added 2 specific function:

//I use h/m/s Alarm, INTA pin
void rtc_set_alarm(unsigned char hour,unsigned char min,unsigned char sec)
{
i2c_start();
i2c_write(0xd0);
i2c_write(7);
i2c_write(bin2bcd(sec));
i2c_write(bin2bcd(min));
i2c_write(bin2bcd(hour));
i2c_write(0x80);
i2c_stop();
}   

void rtc_get_alarm(unsigned char *hour,unsigned char *min,unsigned char *sec)
{
i2c_start();
i2c_write(0xd0);
i2c_write(7);
i2c_start();
i2c_write(0xd1);
*sec=bcd2bin(i2c_read(1));
*min=bcd2bin(i2c_read(1));
*hour=bcd2bin(i2c_read(0));
i2c_stop();
}   
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Epiiiic!

Double necromancy award + offtopic award - first someone in 2005 resurected a 3 year old thread, and then, in 2009 you resurect it again! Best ever!

There are pointy haired bald people.
Time flies when you have a bad prescaler selected.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

:) But al least he did use the Search.

But where to move it ?
1. It shouldn't be here
2. It should be moved the the general 8bit AVR forum
3. But it's so special that it deserves a place in the Hall of Fame

I need to think about that ...

Nard :)

A GIF is worth a thousend words   She is called Rosa, lives at Mint17.3 https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmmmm...

Quote:
Captain Giovannious knew there wasn't much time. Absently he glanced at his watch, or what would normally be a watch, on his wrist. There was a black rectangle of plastic with caterpillar metal legs instead, held on by a loop of Velcro around his wrist.

"Damn DS1307!" he muttered, fiercely tapping the black chip which responded by digging into his wrist. Other than his sharp twang of pain, nothing happened.

"Gotta get that interface going one of these days," he scowled. "Tomorrow, for sure..."

Chuck Baird

"I wish I were dumber so I could be more certain about my opinions. It looks fun." -- Scott Adams

http://www.cbaird.org

Last Edited: Sun. Mar 22, 2009 - 06:51 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Chuck !

A GIF is worth a thousend words   She is called Rosa, lives at Mint17.3 https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why don't you used DS12C887 RTC?

It's very useful for managing the time, day, month and year :wink:

ArcticSoul
Industrial Electronic Engineering, College Student

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Why don't you used DS12C887 RTC?

It's very useful for managing the time, day, month and year


Have you actually bothered to read the preceding messages in this thread?

(anyway all the Maxim/Dallas chips do h:m/d/m/y?!?)