Searching \ for '[PIC]: Tables on the 18x...' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/memory.htm?key=table
Search entire site for: 'Tables on the 18x...'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Tables on the 18x...'
2000\11\24@113741 by o-8859-1?Q?K=FCbek_Tony?=

flavicon
face
Just had a few hours of frustration translating
an jumptable from 16F8x to 18x series.

I known that the 18x series need the jump adress to be doubled
and catered for this *HOWEVER* i did not think of the fact that
an goto instruction on the 18x series actually takes *2* program
locations
also..arghhh... so if one has a jumptable with goto statements
one has to quadruple the jump offset for the 18x. Anyone else aware of
this ?
( ofcource..but I havent heard this issue before ).

/Tony




Tony Kübek, Flintab AB            
²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²
E-mail: spam_OUTtony.kubekTakeThisOuTspamflintab.com
²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2000\11\24@165439 by Bob Ammerman

picon face
Funny, there was a thread on this very issue about 2 days ago!

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

{Original Message removed}

2000\11\24@210241 by Myke Predko

flavicon
face
Hi Tony,

Along with doubling the offset, you will also have to make sure that PCLATH
and PCLATU are correct.

Here is my code for returning a table byte in the PIC18CXX2:


GetDisplayMsg1   ;  Return the byte in FSR0L for the Time String
 movlw   (DisplayTable1 & 0x0FF0000) >> 16
 movwf   PCLATU
 movlw   (DisplayTable1 & 0x000FF00) >> 8
 movwf   PCLATH
 movlw   DisplayTable1 & 0x00000FF
 addwf   FSR0L, w, 0  ;  Get the Destination Address
 btfss   STATUS, C, 0
  bra    GetDisplayMsg1Return
 infsnz  PCLATH, f, 0  ;  Increment the PCLATH Register
  incf   PCLATU, f, 0  ;  If (++PCLATH = 0) then PCLATU++;
GetDisplayMsg1Return
 movwf   PCL

DisplayTable1
 dt      "Time 00:00", 0

{Original Message removed}

2000\11\25@110439 by Olin Lathrop

face picon face
>>
I known that the 18x series need the jump adress to be doubled
and catered for this *HOWEVER* i did not think of the fact that
an goto instruction on the 18x series actually takes *2* program
locations
<<

You could have the table hold addresses instead of GOTO instructions.  That
would require a little bit of code to fetch the table entry and jump to it,
but would cut down the table size by 2.


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, .....olinKILLspamspam@spam@embedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...