[SOLVED] DS1307 code is not working

Status
Not open for further replies.
Thanx for the reply I tested the LCD code it works fine. But still I can't find a solution for the RTCC. This is the link where I found the source code for the RTCC. They faced a similar problem too. But I can't understand what they have done to rectify it.

https://www.mikroe.com/forum/viewtopic.php?f=88&t=50564
 
Last edited:

Attachments

  • PIC18F45K22 DS1307 RTC.rar
    57.7 KB · Views: 68
  • rtc.png
    97.3 KB · Views: 89
Reactions: ADGAN

    ADGAN

    Points: 2
    Helpful Answer Positive Rating
Thank you very much. I'll try this & let you know whether it works or not.
 

When you used multiple source files you have to use extern specifier for variables and functions when it is referenced or used in main file.

Edit: I saw in your project's main file that there is some code outside while(1) loop of main() function. Those code will never get executed.
 
Last edited:

Thanx. I did that on purpose. I wanted to execute only up to that part. I will change it later. Can you explain me how to use the extern specifier? I checked your code and my one. Both works. But both get late to increment time. It takes about 5 seconds to increment 1s . I think may be something to with the delays.
 

Without putting my code I used the hex file you gave me on the attachment. It takes some time (about 5s) to increment 1s. Don't know whether something wrong with the simulator but previously it worked properly. Which version of Proteus are you using?
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…