Jump to content
Electronics-Lab.com Community

ds1307 in assembly


Guest Toruk.makto

Recommended Posts

Guest Toruk.makto

i want drive a ds1307 with ATmega32 in assembly

(ATmega32 works in 8 MHZ internal oscillator mode)

i use this simple program for drive ds1307 and its not working ...

leds randomly turn on and off

the purpose of this program is first send primary Values to ds1307

(second/minute/hour/day/month/year)

and then reading second and send it to porta.(to show on leds)

would you please correct this program or write another simple

program like this one

(i am beginner in assembly and i searched internet and found nothing )

attention: this mode i used in my program called hardware i2c mode which is used

pc0 and pc1 as scl and sda and use registers like twbr/ /twsr/twcr/twdr

the program:
http://www.mediafire.com/view/q2jvdprp4u3micz/ds1307+.asm

schematic:
http://img4u.ir/upload/427ds1307+.JPG

Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
  • Create New...