Searching \ for 'PCLATH and code page problem, does anyone solve?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/index.htm?key=pclath+code+page
Search entire site for: 'PCLATH and code page problem, does anyone solve?'.

Truncated match.
PICList Thread
'PCLATH and code page problem, does anyone solve?'
1998\03\25@053814 by aama–o

flavicon
face
Hi piclisters!
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)
Spain
TLF.   : (+34)(9) 88 327370
FAX    : (+34)(9) 88 327338
E-MAIL: spam_OUTmanuel.castroTakeThisOuTspammx3.redestb.es

1998\03\25@092118 by Ints Mikelsons

flavicon
face
part 0 1930 bytes content-type:text/plainTry this......
Maybe it is what U are looking for?

Manuel Castro Caama–o wrote:

{Quote hidden}

;--------------/ CGRAM TABLE SETS (FONTS#1) /--------------------
;DISP_FONTT_SIZE SET .67                ;TABLE SIZE IN BYTES
;DISP_FONTT_ORG SET (3FEh-.67)

#IFDEF INC_DISP_FONTT
ORG     DISP_FONTT_ORG

DISP_FONTT
#IF ((($>>8)&0x01)!=0)                  ;SET PCLATH BITS
       BSF     PCLATH,0
#ELSE
       BCF     PCLATH,0
#ENDIF

#IF ((($>>8)&0x02)!=0)
       BSF     PCLATH,1
#ELSE
       BCF     PCLATH,1
#ENDIF
#IF ((($>>8)&0x04)!=0)
       BSF     PCLATH,2
#ELSE
       BCF     PCLATH,2
#ENDIF
       ADDWF   PCL,1                           ;MUST BE IN ADDRESS <(100h+SIZE)
#INCLUDE        "I:\P_LIB\INC\SYMB_A.CHR"
#INCLUDE        "I:\P_LIB\INC\SYMB_C.CHR"
#INCLUDE        "I:\P_LIB\INC\SYMB_E.CHR"
#INCLUDE        "I:\P_LIB\INC\SYMB_U.CHR"                    ;!
#INCLUDE        "I:\P_LIB\INC\SYMB_I.CHR"
#INCLUDE        "I:\P_LIB\INC\SYMB_K.CHR"
#INCLUDE        "I:\P_LIB\INC\SYMB_L.CHR"                    ;!
#INCLUDE        "I:\P_LIB\INC\SYMB_N.CHR"                    ;!
#ENDIF

1998\03\25@105143 by Tom Handley

picon face
  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.

  - Tom

At 11:30 AM 3/25/98 +0100, you wrote:
{Quote hidden}

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