I was wondering, for the case of the 16F84, how many characters can we put
in tables? Does this depend on the size of your program or is there space
reserved just for tables in the memory of the MCU?
Thanks,
PJB
At 10:15 PM 2/23/99 -0600, Roy Tate wrote:
{Quote hidden}>Stewart Pye wrote:
>>
>> I know you can define bytes in rom using the db command,
>> What is the best way to access these???
>> ( I'm lost without a data pointer!! )
>
>An easier way to implement lookup tables is in Microchip Application
>Note 556. The simplified version is copied below, but read the
>App. Note for the full scoop.
>
>== BEGIN CODE ==
> .
> movlw offset ;load offset in w reg
> call Table
> .
> .
> .
>Table:
> addwf pcl ;add offset to pc to
> ;generate a computed goto
> retlw 'A' ;return the ASCII char A
> retlw 'B' ;return the ASCII char B
> retlw 'C' ;return the ASCII char C
> .
> .
>== END CODE ==
>
>Regards,
>
>Roy Tate
>
roytate
KILLspamionet.net
>
http://www.ionet.net/~roytate
>