Well it turns out the more intuitive way is also a little faster. That is if I
have done this correctly.
I used [view] [program memory] in MPLab and counted the number of
instructions between the start and end labels.
This code was 18 lines:
Code:
StartTest:
adcData.lowbyte[Index] = ADRESL
adcData.lowbyte[Index+1] = ADRESH
EndTest:
This code was 16 lines:
Code:
StartTest:
tempWord.highbyte = ADRESH
tempWord.lowbyte = ADRESL
adcdata[index] = tempword
EndTest:
So as long as I can afford the extra word variable, I will be using the
temp variable way...... unless someone else reveals a clever trick.
thanks all for your replies,
Mike -
Bookmarks