Aha! Thanks Richard.
pedja089, you mean instead of
@word_array_asbyte=word_array
be:
@ _word_array_asbyte= _word_array
right?
Ioannis
Aha! Thanks Richard.
pedja089, you mean instead of
@word_array_asbyte=word_array
be:
@ _word_array_asbyte= _word_array
right?
Ioannis
@ word_array_asbyte= _word_array
Warning I'm not a teacher
I am facing a problem with arrays.
The task is to grab 10bits of ADC result into array elements.
This works OK:
word_temp.byte0=adresl
word_temp.byte1=adresh
array[i]=word_temp
But this does not:
array.highbyte[i]=adresh
array.lowbyte[i]=adresl
Is something wrong with the above syntax?
Ioannis
array[i]=(adresh<<8)|adresl
or
using ext modifier
array_asbyte[i*2]=adresl
array_asbyte[i*2+1]=adresh
Warning I'm not a teacher
Thanks Richard.
Comparing the
array[i]=(adresh<<8)|adresl
takes about 10 words more on compilation than
word_temp.byte0=adresl
word_temp.byte1=adresh
array[i]=word_temp
Have not tested the EXT version yet.
Ioannis
And the EXT version... 30 words more!!!
I think is too much.
Ioannis
Bookmarks