Urgent assistance rqd - RTC stripdown


Closed Thread
Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Urgent assistance rqd - RTC stripdown

    Are these all the same variable type? You’re not showing variable declarations in the code you posed.
    Code:
    RTCSec,RTCMin,RTCHour,RTCWDay,RTCDay,RTCMonth,RTCYear,RTCCtrl
    If so, you can make it an array and step through them in the I2C Read and Write
    hopefully you can use array elements in PBP I2C commands and it doesn’t stuff up:
    Code:
    for i = 0 to 6
    I2CRead SDApin,SCLpin,$D0+i,$00,[RTCvar[i]]
    next i
    It’s been a while since I used one of the RTCs, but I think you send zero values to fill the command.

    EDIT,,
    I think this will be slightly cheaper, maybe only a word:
    Code:
    	CounterA=(RTCHour>>4)&$03
    	If RTCHour.6=1 then                                ' Work-Out 12 or 24 hour Display for Hours			
    	CounterA=(RTCHour>>4)&$01
    	endif
    Last edited by Art; - 18th June 2015 at 20:29.

Similar Threads

  1. Assistance Required with VB.net
    By malc-c in forum Off Topic
    Replies: 32
    Last Post: - 11th September 2010, 18:26
  2. Resolution integer math assistance?
    By kevlar129bp in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 14th January 2010, 03:01
  3. Need assistance with code
    By mrCizzo in forum mel PIC BASIC
    Replies: 2
    Last Post: - 28th June 2009, 19:29
  4. CDC Assistance
    By ricgar in forum USB
    Replies: 8
    Last Post: - 20th November 2008, 22:31
  5. Help Rqd - Driving 5Volt Relay using two pins
    By Squibcakes in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 5th October 2005, 01:54

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