hi everyone. im trying to produce a sine wave with this section of code, on a 18f2431
Code:
INTCON = %11000000
T1CON = %10000001
 TIMER = 64233
     TIMER.BYTE0 = TMR1L ;= $E9
     TIMER.BYTE1 = TMR1H ;= $FA
  INCLUDE "DT_INTS-18.bas"
;----[High Priority Interrupts]-----------------------------------------------
ASM
INT_LIST  macro    ; IntSource,   Label,  Type,  ResetFlag? 
        INT_Handler   TMR1_INT,   _SINE,   asm,  yes
        
    endm
    INT_CREATE
     
    INT_ENABLE TMR1_INT
                                        
ENDASM


SINE:
PORTA.1 = 1
X = X + 1
IF X > 63 THEN X = 0
LOOKUP X,[127, 139, 152, 164, 176, 187, 198, 208, 217, 225, 233, 239, 244, 249, 252,_
          253, 254, 253, 252, 249, 244, 239, 233, 225, 217, 208, 198, 187, 176, 164,_
          152, 139, 127, 115, 102, 90, 78, 67, 56, 46, 37, 29, 21, 15, 10, 5, 2, 1,_
          0, 1, 2, 5, 10, 15, 21, 29, 37, 46, 56, 67, 78, 90, 102, 115],SINEWAVE

     
PORTA.1 = 0
     
@  INT_RETURN
timer1 works to the preload value, but completely ignores my offset values.
yes, i checked all over the forum, and the solutions suggested was to use timer0. i really need to use this timer, because of its high resolution, and the other timers will be tied up in later programming stages. ive tried all this:
Code:
TIMER = 64233
     TIMER.BYTE0 = TMR1L
     TIMER.BYTE1 = TMR1H
and
Code:
TMR1L = $E9
TMR1H = $FA
what i'm doing wrong?