Scott Dattalo wrote: > > On Fri, 21 Dec 2001, Don Hyde wrote: > > > indexlsb equ 0x80 > > indexmsb equ 0x81 ;table index is here > > temp equ 0x82 > > > > lookup: > > movlw low table > > addwf indexlsb,w > > movwf temp > > movfw indexmsb > > skpnc > > incf indexmsb,w > > addlw high table > > movwf PCLATH > > movfw temp > > movwf FSR > > > > table retlw 1 > > retlw 2 > > ... > > Why not save a couple instructions: > > movlw HIGH(table) > addwf indexmsb,w > movwf PCLATH > movlw LOW(table) > addwf indexlsb,w > skpnc > incf PCLATH,F > movwf PCL > > But the table probably is accessed sequentially: > > incf PCLATH,F > incfsz index,w > decf PCLATH,F > movwf index > movwf PCL > > But even better IMO, is to use the 16F877 or similar flash device and > store the table directly in ROM. One word holds 14-bits, 9 words hold 16 > bytes. Also, since this is a bit stream, you really don't have to worry > about artificial byte boundaries. Thanks for the input Don and Scott re the table! That last idea is very nice Scott, thanks, I will definitely implement that. Since the encoder software outputs the sound wave data in .asm format how would I go about using all 14 bits? And any suggestions for reading bits squentially from the program memory?? :o) -Roman PS. I have a couple of nice compression systems also under test, they will go well with a 7bit data unit size. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu