Dears,
I'm trying to implement an example dealing with timer1 and it's interrupt.
the is written by BASCOM-AVR but when i compile it i got the error showed in the attached photo
can I please know what that mean?
this is the code:
Dim New_time As Byte
Dim Temp As Byte
Dim Seconds As Byte
Dim Minutes As Byte
Dim Hours As Byte
Dim Key As Byte
Const True = 1
Const Reload = 62500
Config Timer1 = Timer , Prescale = 64
Ocr1ah = High(reload) 'Output Compare RegisterA
Ocr1al = Low(reload)
Tccr1a = 0
Set Tccr1b.3 'bit CTC1 of control register TCCR1B must be set.
Config Portb = Output
Portb = 255
On Compare1a Timer1_isr 'compare interrupt oc-curs.
Enable Compare1a
Enable Interrupts
Do
Key = Pind
If Key = &H7F Then
Seconds = 0
Minutes = 0
Hours = 0
End If
While New_time = True
If Seconds = 60 Then
Seconds = 0
Incr Minutes
End If
If Minutes = 60 Then
Minutes = 0
Incr Hours
End If
If Hours = 24 Then Hours = 0
Temp = Makebcd(seconds)
If Key = &HFE Then Temp = Makebcd(minutes)
If Key = &HFD Then Temp = Makebcd(hours)
Portb = Not Temp
New_time = Not True
Wend
Loop
End
Timer1_isr:
New_time = True
Incr Seconds
Return