array index variables required to be words

Chris
2012-02-18
2013-05-30
  • Chris
    Chris
    2012-02-18

    for my 16f1826 enhanced chip i get errors unless my array index variables are word sized variables. can anyone fix this because the word variables makes my code entirely too large to fit on my chip

     
  • Tom
    Tom
    2012-05-27

    same problem. Have you solve it?

     
  • Tom
    Tom
    2012-05-27

    Here is my code :

    ;Chip Settings
    #chip 16F1827,20
    #config FOSC_HS,WDTE_OFF

    ;Variables
    Dim a0(10)

    dir PORTB.0 in
    dir PORTB.1 out
    iy = 0
    i = 0
    Start:
    a0.i(iy) = portb.0
    if portb.1 = 1 then  ' for test purpose
    portb.1 = 0
    else
    portb.1 = 1
    end if
    i = i + 1
    if i > 7 then
    i = 0
      iy = iy + 1
      if iy > 10 then
      iy = 0
      end if
    end if
    goto start

    it gave me error.

    Error: GCASM: Symbol IY_H has not been defined

    With older chip like 16F877 it compiled it perfect