Data from DS1307 (BCD) saved to ext memory and read back to display


Results 1 to 11 of 11

Threaded View

  1. #7
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: Data from DS1307 (BCD) saved to ext memory and read back to display

    Address should be word or byte variable, not constant.
    Code:
         MemAdr var word
        MemAdr =0
        ' Write to external memory
        I2CWRITE SDA,SCL,$A0,MemAdr ,[RTC_Sec,RTC_Min,RTC_Hou]
        PAUSE 10
        
        'Read from external memory
        I2CREAD SDA,SCL,$A0,MemAdr ,[RTC_Sec,RTC_Min,RTC_Hou]
    EDIT:
    Constant works for clock, as PBP send minimum 8 bits, but it wont work for EEPROM as it expecting 16bits.
    I mention that in another topic.
    Last edited by pedja089; - 20th July 2016 at 22:29.

Similar Threads

  1. Replies: 2
    Last Post: - 3rd January 2013, 16:57
  2. DS1307 - How to store Decimal Value & how to convert back to BCD?
    By financecatalyst in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 2nd January 2011, 23:44
  3. loading data to EXt. eeprom
    By MINHLE in forum General
    Replies: 0
    Last Post: - 28th December 2009, 17:56
  4. Write Onewire data toa I2C memory / read ASCI
    By Eugeniu in forum mel PIC BASIC Pro
    Replies: 67
    Last Post: - 16th November 2008, 19:19
  5. cannot read/write to 16F690 data memory after CPD_ON
    By awdsas in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 22nd November 2006, 11:46

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