View previous topic :: View next topic |
Author |
Message |
lukatsc
Joined: 08 Sep 2022 Posts: 7
|
Posted: Fri Nov 25, 2022 5:07 pm Post subject: DCF 77 Assign a Variable |
|
|
I have build a dcf 77 clock which is working. I want to extend the program with zodiac signs. Therefore I want to assign a 2 Variables - Tag and Monat. I have tried it many times but it is not working.
Here is a small excerpt from the program:
Dim Tag as Byte
Dim Monat as Byte
Wochentag:
Wochentag = Dayofweek() '0=Mo 1=Di ... 6=So
Locate 1 , 1
Lcd " " ; Lookupstr(wochentag , Wochentage)
' Datum:
Lcd _day ; "." ; Lookupstr(_month , Monate) ; " 20" ; _year ; " "
' Lcd Date$ 'geht auch tt.mm.jj
' Uhrzeit:
Locate 2 , 1 : Lcd " " ; Time$
' Empfang o.k. Symbol:
Locate 2 , 16
If Synchron = 1 Then
Lcd Chr(0) 'DCF o.k.
Else
Lcd " " 'DCF nicht o.k.
End If
End If
Return
When I write:
_day = Tag
_month = Monat
it doesn`t work. How can I solve this problem. Thank you
(BASCOM-AVR version : 2.0.8.5 ) |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Fri Nov 25, 2022 5:27 pm Post subject: |
|
|
you need to use the internal dcf variables : dcf_month and dcf_day _________________ Mark |
|
Back to top |
|
|
MWS
Joined: 22 Aug 2009 Posts: 2262
|
Posted: Fri Nov 25, 2022 6:02 pm Post subject: |
|
|
albertsm wrote: | you need to use the internal dcf variables : dcf_month and dcf_day |
They way the TO assigns the variables, it would alter the internal ones.
Quote: | When I write:
_day = Tag
_month = Monat |
Hopefully this does not result in a feedback-loop and thus alter the time/date of the Mainflingen-transmitter. |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Fri Nov 25, 2022 6:24 pm Post subject: |
|
|
yes , the variables should be read, not assigned.
my dcf77 received from conrad is still working perfect.
one tip : do not put the module near your monitor. _________________ Mark |
|
Back to top |
|
|
lukatsc
Joined: 08 Sep 2022 Posts: 7
|
Posted: Mon Nov 28, 2022 8:44 am Post subject: DCF 77 Assign a Variable |
|
|
Today I have tested it and it works
Thank you
|
|
Back to top |
|
|
|