I have a problem I can't seem to figure out involving the DIV32 command. I am filling an array with 11 successive time measurements. I need to divide a large constant by each member of the array
and output the result over a serial port to my PC.
for i = 0 to 10
velocity = speed[i]
dummy = a * b 'RPM = 240000/velocity
RPM = div32 velocity
speed[i] = RPM
next i
for i = 0 to 10
debug dec speed[i],", "
next i
debug 10,13
goto main
I tried to use:
a con 240
b con 1000
and got screwy results.
If I use:
a var word
b var word
a = 240
b = 1000
I get the right answers.
Why can't I multiply 2 constants together?
I know there is a simple answer. I just don't see it
Bookmarks