R
Roger Hamlett
- Jan 1, 1970
- 0
Depends how big the table needs to be, and whether it is a conventionalRich Grise said:IIRC, I once scoured the PIC datasheet - _A_ PIC datasheet - to see how
hard a lookup table would be. Turns out it's a SOB.
Thanks,
Rich
PIC, or one of the 'flash' models. If the table is under one page bank
size, then you just have a list of RETLW instructions with the required
values, and a 'header', adding the value you want to look up to the
program counter. If it is over a page, it has to be split into multiple
sections, and becomes a SOB. On the latter flash chips, most support a
direct 'read' operation in the program memory, using a pointer register,
which makes it simple.
Best Wishes