PDA

View Full Version : Error: This style srray syntax not supported??????



comwarrior
- 20th March 2010, 03:27
Using MCS, PBP2.47, MPASM
PIC = 18F4550

The two line of core are...

ADT[ADCHAN].highbyte = ADRESH
ADT[ADCHAN].lowbyte = ADRESL

i tried the alternates with the same results...


ADT[ADCHAN].byte0 = ADRESH
ADT[ADCHAN].byte1 = ADRESL

Any idea whats causing it and how to fix it?

Thanks

:edit,
ADT is word array of 8
ADCHAN is byte var

Darrel Taylor
- 20th March 2010, 04:02
>>Any idea whats causing it ...
Wrong syntax.

>> and how to fix it?

ADCIN 0, ADT[ADCHAN]
-- OR --


ADresult VAR WORD EXT
@ADresult = ADRESL

...
ADT[ADCHAN] = ADresult

-- OR --

ADT[ADCHAN] = ADRESH << 8 + ADRESL

-- OR --

...<br>

comwarrior
- 21st March 2010, 01:42
Thanks Darrel... I used the latter because i'm using ADC int's... with your interrupt system... and so, can't use ADCIN...

Thanks