DS1307 not running?


Closed Thread
Results 1 to 19 of 19

Hybrid View

  1. #1
    Join Date
    Jun 2013
    Posts
    31


    Did you find this post helpful? Yes | No

    Default Re: DS1307 not running?

    After I post this question here ,I retry my setup and it start functioning,I had not change anything,the unsuccessful attempt maybe due to the ripple from my power supply,I had added two filter capacitor to the setup,the earlier setup may have cause the mcu keep restarting itself.

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,695


    Did you find this post helpful? Yes | No

    Default Re: DS1307 not running?

    glad to see you got it to go

    steve
    here is an extract from the pbp3 manual

    The upper 7 bits of the Control byte contain the control code along with chip select or additional address information, depending on the particular device. The low order bit is an internal flag indicating whether it is a read or write command and should be kept clear.

    as I said bit 0 is set as required by the pbp complier

  3. #3
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: DS1307 not running?

    Richard,

    I am amazed that it works using $D0 for read and write control. Simply because this is not how others have coded the I2C instruction for this device in the past and it worked for them. Also the data sheet is very specific on the procedure to use for write and read procedures which obviously PBP3 is not following but still works.

    Does this mean that read the manual and the data sheet is no longer good advice?

  4. #4
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: DS1307 not running?

    Mystery solved, in my mind anyway, The I2C command has been changed in PBP3 and the PBP3 manual does point this out. So older code written for previous versions of PBP needs modifying accordingly. When reading the data sheets these changes need to be taken into account.

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,695


    Did you find this post helpful? Yes | No

    Default Re: DS1307 not running?

    simple explanation for their success is as I said in post 13 .
    bit 0 is set as required by the pbp complier .
    probably should have said
    bit 0 is set and or cleared as required by the pbp complier.
    but the book indicates bit0 should always be 0
    the 24lcxxx example in the manual makes usage of this (Address) function fairly clear I think

  6. #6
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: DS1307 not running?

    I found #16 a better explanation. Thanks again.

Similar Threads

  1. Replies: 8
    Last Post: - 28th January 2014, 15:21
  2. using DS1307
    By Scampy in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 2nd December 2013, 11:01
  3. 18F4550 not running
    By comwarrior in forum General
    Replies: 6
    Last Post: - 1st January 2011, 02:07
  4. Cant get my PIC running
    By Viberer in forum Off Topic
    Replies: 13
    Last Post: - 29th August 2008, 21:07

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts