repost of the repost, I don''t know what went wrong....Clock Help
Archiver
Posts: 46,084
Tracy,
I have tried what you said, with mixed success......
The clock side of things now looks like this :-
prgclk
DEBUG "PRGCLK",cr
SERIN 3\12, 16468, [noparse][[/noparse]hours]
SERIN 3\12, 16468, [noparse][[/noparse]minutes]
SERIN 3\12, 16468, [noparse][[/noparse]day]
'hours = $13
'minutes = $14
'day = $7
Month = $12
Date = $03
Year = $02
Seconds = $00
debug dec2 hours,cr
debug dec2 minutes,cr
debug dec2 day,cr
debug ? month
debug ? hours
pause 6000
GOSUB SetTimeAndDate
and the transmitters program looks like this:-
sendclockdata
high 12 'makes pin 12 high
pause 10 'allow some time for the table to wake up
hours = 18
minutes = 45
day = 7 'entered these for testing the routine
SEROUT 7\8, 16468, [noparse][[/noparse]hex hours,hex minutes,hex day] ' Send the time set info
to the table.
low 12
gosub rsdp
gosub thirdline
serout a,bps,[noparse][[/noparse]" CLOCK SET"]
pause 1000
gosub rsdp
gosub startofidx
pointer=0
goto m1
This won't work.
I tried this out to see whether it would work and it worked fine.
sendclockdata
high 12 '
pause 10 'allow some time for the table to wake up
SEROUT 7\8, 16468, [noparse][[/noparse]$16,$45,$1] ' Send the time set info to the table.
low 12
gosub rsdp
gosub thirdline
serout a,bps,[noparse][[/noparse]" CLOCK SET"] 'prints to the LCD
pause 1000
gosub rsdp
gosub startofidx
pointer=0
goto m1
Any ideas what I'm doing wrong still??
I have tried what you said, with mixed success......
The clock side of things now looks like this :-
prgclk
DEBUG "PRGCLK",cr
SERIN 3\12, 16468, [noparse][[/noparse]hours]
SERIN 3\12, 16468, [noparse][[/noparse]minutes]
SERIN 3\12, 16468, [noparse][[/noparse]day]
'hours = $13
'minutes = $14
'day = $7
Month = $12
Date = $03
Year = $02
Seconds = $00
debug dec2 hours,cr
debug dec2 minutes,cr
debug dec2 day,cr
debug ? month
debug ? hours
pause 6000
GOSUB SetTimeAndDate
and the transmitters program looks like this:-
sendclockdata
high 12 'makes pin 12 high
pause 10 'allow some time for the table to wake up
hours = 18
minutes = 45
day = 7 'entered these for testing the routine
SEROUT 7\8, 16468, [noparse][[/noparse]hex hours,hex minutes,hex day] ' Send the time set info
to the table.
low 12
gosub rsdp
gosub thirdline
serout a,bps,[noparse][[/noparse]" CLOCK SET"]
pause 1000
gosub rsdp
gosub startofidx
pointer=0
goto m1
This won't work.
I tried this out to see whether it would work and it worked fine.
sendclockdata
high 12 '
pause 10 'allow some time for the table to wake up
SEROUT 7\8, 16468, [noparse][[/noparse]$16,$45,$1] ' Send the time set info to the table.
low 12
gosub rsdp
gosub thirdline
serout a,bps,[noparse][[/noparse]" CLOCK SET"] 'prints to the LCD
pause 1000
gosub rsdp
gosub startofidx
pointer=0
goto m1
Any ideas what I'm doing wrong still??