Hi
I would like to add up and average the content of a bunch of registers and
wonder how this can be done most efficient. (PICAXE 20M2)
I started with
only to realize that for some strange reason I am getting a syntax error if I use a register
that is larger than b27 although the simulation does allow me to look at b30, b31.... strange..
For instance:
do I really have to do something like
??
Thanks
I would like to add up and average the content of a bunch of registers and
wonder how this can be done most efficient. (PICAXE 20M2)
I started with
Code:
let w0 = b34+b35+b36+b37+b38+b39+b40+b41
w0=w0/8
only to realize that for some strange reason I am getting a syntax error if I use a register
that is larger than b27 although the simulation does allow me to look at b30, b31.... strange..
For instance:
Code:
let w0 = b28
Code:
peek 34,b1
w0=w0+b1
peek 35,b1
w0=w0+b1
...
Thanks