RTC 1302 !!! Set time Routine !!


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2005
    Posts
    32

    Default RTC 1302 !!! Set time Routine !!

    I tried to use this convertion subroutine ( I found this code form our forum !! thx)



    for a=0 to 59
    if decx=a then decx=$a 'This loop does not work. The one who knows how to make it, pls post it to the forum.
    next a


    in stead of this i use convertion sub routine.
    this convertion routine must be use but i haven't much code space ..
    how can i convert
    0 to $0
    1 to $1
    ..... soon

    thx
    '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!
    convertion:


    if decx= 59 then decx= $59
    if decx= 58 then decx= $58
    if decx= 57 then decx= $57
    if decx= 56 then decx= $56
    if decx= 55 then decx= $55
    if decx= 54 then decx= $54
    if decx= 53 then decx= $53
    if decx= 52 then decx= $52
    if decx= 51 then decx= $51
    if decx= 50 then decx= $50
    if decx= 49 then decx= $49
    if decx= 48 then decx= $48
    if decx= 47 then decx= $47
    if decx= 46 then decx= $46
    if decx= 45 then decx= $45
    if decx= 44 then decx= $44
    if decx= 43 then decx= $43
    if decx= 42 then decx= $42
    if decx= 41 then decx= $41
    if decx= 40 then decx= $40
    if decx= 39 then decx= $39
    if decx= 38 then decx= $38
    if decx= 37 then decx= $37
    if decx= 36 then decx= $36
    if decx= 35 then decx= $35
    if decx= 34 then decx= $34
    if decx= 33 then decx= $33
    if decx= 32 then decx= $32
    if decx= 31 then decx= $31
    if decx= 30 then decx= $30
    if decx= 29 then decx= $29
    if decx= 28 then decx= $28
    if decx= 27 then decx= $27
    if decx= 26 then decx= $26
    if decx= 25 then decx= $25
    if decx= 24 then decx= $24
    if decx= 23 then decx= $23
    if decx= 22 then decx= $22
    if decx= 21 then decx= $21
    if decx= 20 then decx= $20
    if decx= 19 then decx= $19
    if decx= 18 then decx= $18
    if decx= 17 then decx= $17
    if decx= 16 then decx= $16
    if decx= 15 then decx= $15
    if decx= 14 then decx= $14
    if decx= 13 then decx= $13
    if decx= 12 then decx= $12
    if decx= 11 then decx= $11
    if decx= 10 then decx= $10
    if decx= 9 then decx= $09
    if decx= 8 then decx= $08
    if decx= 7 then decx= $07
    if decx= 6 then decx= $06
    if decx= 5 then decx= $05
    if decx= 4 then decx= $04
    if decx= 3 then decx= $03
    if decx= 2 then decx= $02
    if decx= 1 then decx= $01
    if decx= 0 then decx= $00
    return

  2. #2
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Cool

    Pls goto the following thread to get the latest update for the entire code. The new code is with shorter convertion subroutine and provides more space.

    http://www.picbasic.co.uk/forum/showthread.php?t=423

    ------------------------------------
    Last edited by sayzer; - 24th February 2006 at 19:00.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  3. #3
    Join Date
    Apr 2005
    Posts
    32


    Did you find this post helpful? Yes | No

    Smile

    thx thx thx !!!!

Similar Threads

  1. Interruptus Frustratus
    By Byte_Butcher in forum General
    Replies: 16
    Last Post: - 17th April 2009, 20:36
  2. 16F628A - Stops if release power switch.
    By dene12 in forum General
    Replies: 16
    Last Post: - 14th February 2009, 07:57
  3. UberNewbie can't set his clock...
    By Byte_Butcher in forum General
    Replies: 19
    Last Post: - 7th January 2009, 04:22
  4. Alarm Time
    By Santana in forum Code Examples
    Replies: 1
    Last Post: - 8th December 2006, 13:58
  5. error on compiling
    By parker in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 16th June 2005, 14:31

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