Tables of 1K size are common. Put your program in the first 1K, a large table in the second 1K of program memory. This is handy to do table lookups if your program must be fast and acting in real time. See the Embedded Control Handbook (by Microchip) and in there is app note 258? - can't remember exactly; however, the author there points out how to handle page boundaries with a TABLE generically. Basically, you monitor for a page boundary as you do a computed GOTO to the table. Hope that helps. Phil Anderson. On Tuesday, June 13, 2000 4:02 PM, Harold M Hallikainen [SMTP:haroldhallikainen@JUNO.COM] wrote: > On Mon, 12 Jun 2000 20:03:46 -0700 Andrew Warren > writes: > > Peter Betts wrote: > > > > > Now the table is therefore inherently limited by the size of the > > > PCL register? Yes? This is 8 bits so the table size can only be > > > 256 max. > > > > Yes, exactly. > > > > > If the table is larger than 256 one has to start to modify the > > PCLATH > > > register as well to adapt the higher bits of the program counter. > > > > Correct. > > > > > > In a current project, I have a dictionary with the spelling of a word > (with the MSB set on the last character) followed by a 16 bit pointer > into an ISD speech chip. The dictionary is considerably larger than 256 > bytes. I have a routine that just gets the next byte from the dictionary. > It has a couple variables called DictionaryPointerHi and > DictionaryPointerLo. In the routine that actually returns the byte, > pclath is loaded from DictionaryPointerHi, then DictionaryPointerLo is > added to pcl. To increment the pointer, I increment DictionaryPointerLo, > watch for rollover and increment the high half if there was a rollover. > This allows for a very large table in ROM. > On returning back to my main code, I clear pclath since the high bits of > it are used in goto and call. > So, BIG tables are possible! > > Harold > > > FCC Rules Online at http://hallikainen.com/FccRules > Lighting control for theatre and television at http://www.dovesystems.com > > ________________________________________________________________ > YOU'RE PAYING TOO MUCH FOR THE INTERNET! > Juno now offers FREE Internet Access! > Try it today - there's no risk! For your FREE software, visit: > http://dl.www.juno.com/get/tagj.