[quote:2629b15f47="Evert :-)"]I don't like the name of the variables [b:2629b15f47]Bit_1 & Bit_2[/b:2629b15f47].
Bit is an reserved word and the underscore is used to continue break up a long line.
Maybe the compiler is confused about that.
Edit: Try, Force the compiler to save the Bit_1&2 in an other byte then Tick.
[code:1:2629b15f47]
'Global variables
Dim Tick As Bit
Dim Dummie1 As Bit
Dim Dummie2 As Bit
Dim Dummie3 As Bit
Dim Dummie4 As Bit
Dim Dummie5 As Bit
Dim Dummie6 As Bit
Dim Dummie7 As Bit
Dim Bit_1 As Bit
Dim Bit_2 As Bit
[/code:1:2629b15f47][/quote:2629b15f47]
Thanks Evert,
I have tried renaming the bit variables, although I'm not sure if you meant I try something else?
Anyway, I have simplified the "program" even further an still there is a problem:
'define chip to use
$regfile = "m328def.dat"
'define used crystal
$crystal = 1000000
Ddrb = &B00111110
Ddrc = &B0011111
Ddrd = &B00001110
$hwstack = 120 'defualt use 32
$swstack = 120 'default use 10
$framesize = 200 'default use 40
Config Timer1 = Timer , Prescale = 1 , Clear_timer = 1 'clear timer 1 upon compare A match
Compare1a = 46874
On Compare1a Timer_tick
Enable Compare1a
Enable Interrupts
'************************************
'Global variables
Dim Tick As Bit
Dim Bob As Bit
Dim Sue As Bit
'*************************************
Do
While Tick = 1
Reset Tick
Toggle Portc.2
Wend
Bob = Sue '<<<<<<<<<<<<<<<<<<<<<<< This line causes a disturbed toggle pattern?????????????
Loop
'*************************************
Timer_tick:
Set Tick
Return
End
↧