Setting up for a "Rotate" operation, the following is accepted by the compiler:
C = 0
or
C = 1
The following causes a compiler error:
Dim myBit as bit
myBit = 0
C = myBit
Error Message:
AVR C bit problem.gcb (5): Error: Invalid variable name: C
AVR C bit problem.gcb (5): Warning: Variable name C is used for a system bit on the current chip
Is there a way to set C from a variable?
Joe
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2014-05-22
A while back I did some bit-twiddling with the carry bit. The goal was to turn on one and only one bit in a byte specified by a number. Here's the code:
number = number - ASCIIzero ;convert from ASCII to number
pattern = 0 ;now extract which LED to light
status.c = 1 ;set the carry flag
for i = 0 to number ;rotate to correct position
rotate pattern left
next i
LEDs = pattern ;then light the LED
Maybe that'll give you an idea.
Thomas henry
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Platform: Arduino w/ATMEGA328P, 16 Mhz
Setting up for a "Rotate" operation, the following is accepted by the compiler:
C = 0
or
C = 1
The following causes a compiler error:
Dim myBit as bit
myBit = 0
C = myBit
Error Message:
AVR C bit problem.gcb (5): Error: Invalid variable name: C
AVR C bit problem.gcb (5): Warning: Variable name C is used for a system bit on the current chip
Is there a way to set C from a variable?
Joe
A while back I did some bit-twiddling with the carry bit. The goal was to turn on one and only one bit in a byte specified by a number. Here's the code:
Maybe that'll give you an idea.
Thomas henry