Hi,
I am nearly there with my program for my picaxe clock using a a 4 digit display and pic 18 x chip. I can get my program to display the time in 24 hour clock setting. But the problem is the timing of the clock, I am slow by 2 to 3 mins of real time over 24 hours. I cannot get the clock to run this accuratley going fast. My idea was if I could get the clock running fast by 2 - 3 mins then I could just pause the program for this amount of time at midnight, which I would be happy with. I have spent a long time trying to get around this any help would be very welcome. Here is my program.
main:
let b0= 31 ' %00011111
let b1= 47 ' %00101111
let b2= 79 ' %01001111
let b3= 143 ' %10001111
label_3A: for b6= 1 to 84
for b5= 1 to 85 ' Pins nare repeated to get even brightness on display
let pins =b3
let pins =b0
let pins =b1
let pins =b2
let pins =b1
let pins =b2
let pins =b3
let pins =b0
let pins =b2
let pins =b3
let pins =b0
let pins =b1
let pins =b3
let pins =b2
let pins =b0
let pins =b1
let pins =b0
let pins =b2
next b5
next b6
label_14: if b0= 22 then label_41
let b0=b0- 1
'pause 1000
goto label_3A
label_41: let b0= 31
if b1= 42 then label_51
let b1= b1-1
'pause 1000
goto label_3A
label_51: let b1= 47
if b2= 70 then label_52
let b2= b2-1
if b2= 75 then label_100
goto label_3A
label_52: let b2= 79
if b3= 141 then label_53
let b3= b3-1
'pause 1000
goto label_3A
label_53: goto main:
label_100: pause 174000
if b3= 141 then main
goto label_3A
I am nearly there with my program for my picaxe clock using a a 4 digit display and pic 18 x chip. I can get my program to display the time in 24 hour clock setting. But the problem is the timing of the clock, I am slow by 2 to 3 mins of real time over 24 hours. I cannot get the clock to run this accuratley going fast. My idea was if I could get the clock running fast by 2 - 3 mins then I could just pause the program for this amount of time at midnight, which I would be happy with. I have spent a long time trying to get around this any help would be very welcome. Here is my program.
main:
let b0= 31 ' %00011111
let b1= 47 ' %00101111
let b2= 79 ' %01001111
let b3= 143 ' %10001111
label_3A: for b6= 1 to 84
for b5= 1 to 85 ' Pins nare repeated to get even brightness on display
let pins =b3
let pins =b0
let pins =b1
let pins =b2
let pins =b1
let pins =b2
let pins =b3
let pins =b0
let pins =b2
let pins =b3
let pins =b0
let pins =b1
let pins =b3
let pins =b2
let pins =b0
let pins =b1
let pins =b0
let pins =b2
next b5
next b6
label_14: if b0= 22 then label_41
let b0=b0- 1
'pause 1000
goto label_3A
label_41: let b0= 31
if b1= 42 then label_51
let b1= b1-1
'pause 1000
goto label_3A
label_51: let b1= 47
if b2= 70 then label_52
let b2= b2-1
if b2= 75 then label_100
goto label_3A
label_52: let b2= 79
if b3= 141 then label_53
let b3= b3-1
'pause 1000
goto label_3A
label_53: goto main:
label_100: pause 174000
if b3= 141 then main
goto label_3A