pcf8583, seriall eeprom and f876


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    Macedonia
    Posts
    7

    Default pcf8583, seriall eeprom and f876

    Hi for all,
    I need help abouth this, I need some king data logger,
    to work this,
    when one door is opened I need to register when (date + time), put this in eeprom, with possibility for reed eeprom with PC ,
    rs232 for example,
    regards
    ps In pbp or ass
    Last edited by pasicr; - 27th August 2007 at 19:42.

  2. #2
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    966


    Did you find this post helpful? Yes | No

    Default

    You planning to do this yourself? How much code have you got? Where are you stuck?

  3. #3
    Join Date
    Nov 2005
    Location
    Macedonia
    Posts
    7


    Did you find this post helpful? Yes | No

    Default Hi

    Hi Jerson,
    I need help abouth using RTC pcf8583, if you have some example, please share with me,
    regards

  4. #4
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    966


    Did you find this post helpful? Yes | No

    Default

    I have this. Hope it helps you

    Code:
    ' RTC registers
    ControlReg      con     0
    SecondsReg      con     2
    DayYear         con     5
    Month           con     6
    TimerReg        con     7
    AlarmReg        con     8
    
    Time            var     byte[3]
    
    '================================================================================
    ' I2C   RTC PCF8583  CODE  using I2C_read and I2C_write routines of compiler
    '================================================================================
    ' RTC registers are defined
    ' 0       -       Command / Status register
    '   .0  timer flag
    '   .1  alarm flag
    '   .2  alarm enable 1 -  enabled
    '   .3  mask flag
    '   .54  function 00 clock 32.768KHz/01 clock 50Hz/10 evt counter/11 test
    '   .6  hold last count flag
    '   .7  stop counting, reset divider
    ' 1       -       1/10 s | 1/100s
    ' 2       -       10s    | 1s       seconds
    ' 3       -       10m    | 1m       minutes
    ' 4       -       10h    | 1h       hours
    '   .3..0 unit hours BCD
    '   .54   10s hours 0..2 binary
    '   .6    1 PM
    '   .7    1 12 hour format
    ' 5       -       10d    | 1day     Day & Year
    '   .3..0 unit days BCD
    '   .54   ten days 0..3 binary
    '   .76   year 0..3 binary (read 0 if mask)
    ' 6       -       10mo   | 1month   month
    '   .3..0 unit months BCD
    '   .4    ten months
    '   .7..5 weekdays 0..6 binary (read 0 if masked)
    ' 
    ' 0x10 to 0xff  RAM
    
    ' If RTC is not running, start it
    TimerOff:
        I2CWRITE SDA, SCL, $A2, ControlReg, [0]
        return
        
    ' Read the time in BCD format
    RTC_GetTime:
        I2Cread SDA, SCL, $A2, SecondsReg+0, [Time[2],Time[1],Time[0]]
        return
    
    ' Set time in BCD format
    RTC_SetTime:
        I2Cwrite  SDA, SCL, $A2, SecondsReg+0, [Time[2],Time[1],Time[0]]
        goto  TimerOff
    
    ' ***********************************************************************
    '             End of 8583 code
    ' ***********************************************************************

  5. #5
    Join Date
    Nov 2005
    Location
    Macedonia
    Posts
    7


    Did you find this post helpful? Yes | No

    Default Thank

    Thank you,
    do you have some explanation about summer and winter time calculating and 8583,
    regards

  6. #6
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    966


    Did you find this post helpful? Yes | No

    Default

    No, we don't have that concept in India, so I haven't done it.

Members who have read this thread : 1

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