'PCLATH and code page problem, does anyone solve?'
I have a 'titanic' problem with my program, i made it with several
(sub)routines wich i put in bank 2 and bank 3. The Interrupt Service Routine
is at 0x04 and main program code comes from ORG 0x25 to 0x180 aprox.
Routines can be called from main program and from other routines, and pic
(16f84) can't work well, because i don't know how PCLATH must be set after
execution of the subroutine.
Does anyone solve this problem?
Investimento e Investigacisn Industrial, S.L.
Av. Galicia 51-53
32300 Barco de Valdeorras (Orense)
TLF. : (+34)(9) 88 327370
FAX : (+34)(9) 88 327338
part 0 1930 bytes content-type:text/plainTry this......
Maybe it is what U are looking for?
Manuel Castro Caama–o wrote:
;--------------/ CGRAM TABLE SETS (FONTS#1) /--------------------
;DISP_FONTT_SIZE SET .67 ;TABLE SIZE IN BYTES
;DISP_FONTT_ORG SET (3FEh-.67)
#IF ((($>>8)&0x01)!=0) ;SET PCLATH BITS
ADDWF PCL,1 ;MUST BE IN ADDRESS <(100h+SIZE)
#INCLUDE "I:\P_LIB\INC\SYMB_U.CHR" ;!
#INCLUDE "I:\P_LIB\INC\SYMB_L.CHR" ;!
#INCLUDE "I:\P_LIB\INC\SYMB_N.CHR" ;!
Manuel, you don't have to worry about code page switching on a 16F84 as
it only has 1K of code memory. There is no bank 1, 2, or 3. Just ORG your
code after your interrupt service routine and call your subroutines. You do
have to keep track of the stack level (up to 8 levels). If you call a routine
from the main program, then call another from the current routine, you have
used two levels. Each time you return from a routine the level goes back up
one level. Unless you exceed 8 levels, you don't have to worry about it.
At 11:30 AM 3/25/98 +0100, you wrote:
More... (looser matching)
- Last day of these posts
- In 1998
, 1999 only
- New search...