PDA

View Full Version : RTC 1302 !!! Set time Routine !!



uludere72
- 24th February 2006, 07:43
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

sayzer
- 24th February 2006, 09:10
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

------------------------------------

uludere72
- 24th February 2006, 09:28
thx thx thx !!!!