Walter,
Try this. It gives you a lot smaller table by packing two bytes into each word space. If you stick with the RETLW approach just uncomment the addwf WREG.
Code:ASM SineTable movlw UPPER Table1 movwf TBLPTRU movlw HIGH Table1 movwf TBLPTRH movlw LOW Table1 movwf TBLPTRL movf _STEPCOUNT,W ;addwf WREG ; uncomment only if using RETLW tables VS db addwf TBLPTRL TBLRD* movf TABLAT, W return Table1 db 0,128,148,167,185,200,213,222,228,230,228,222,213,200,185,167 db 148,128,180,108,89,71,56,43,34,28,26,28,34,43,56,71,89,108 ENDASM




Bookmarks