Searching \ for '[F84] 256Byte membory segments' 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=256byte+membory
Search entire site for: '256Byte membory segments'.

Exact match. Not showing close matches.
PICList Thread
'[F84] 256Byte membory segments'
1999\02\23@164746 by Sam Powell

flavicon
face
Whats the deal with the 256byte memory segments.. They are not page
boundries are they? i.e. why does it matter if i have a data table crossing
its boundy?

Also... since 11 bits is enough to address 2K, why does one have to mess
with the PCLATH register when do inter-segment goto's /calls.

ICQ: 23977120
E-Mail: spam_OUTspwebTakeThisOuTspamglobalnet.co.uk

1999\02\23@170858 by Tony Nixon

flavicon
picon face
Sam Powell wrote:
>
> Whats the deal with the 256byte memory segments.. They are not page
> boundries are they? i.e. why does it matter if i have a data table crossing
> its boundy?

To access a table data you must modify the PCL register.

ie movf offset,w
  addwf pcl
  retlw datavalue

By modifying the PCL register the PC change is limited to 8 bits, hence
the 256 byte pages.

In this scenario the page concept becomes very important, and the PCLATH
register needs to be set accordingly.

> Also... since 11 bits is enough to address 2K, why does one have to mess
> with the PCLATH register when do inter-segment goto's /calls.

You don't wiith the F84.

--
Best regards

Tony

Multimedia 16F84 Beginners PIC Tools.
** NEW PicNPro Programmer and Port Interface **

http://www.picnpoke.com
Email .....picnpokeKILLspamspam@spam@cdi.com.au

1999\02\23@171522 by Gerhard Fiedler

picon face
At 21:40 02/23/99 +0000, Sam Powell wrote:
>Whats the deal with the 256byte memory segments.. They are not page
>boundries are they? i.e. why does it matter if i have a data table crossing
>its boundy?

when you jump into a table using a computed goto by writing to the PCL
register, the bits above the 8 bits in PCL (that's 256 addresses) are taken
from PCLATH. so it does matter if your table crosses a 256 byte boundary,
because then you need different values in PCLATH for one table.

>Also... since 11 bits is enough to address 2K, why does one have to mess
>with the PCLATH register when do inter-segment goto's /calls.

if you do only intra-page (note "intra", not "inter", and the 2k-segments
are called pages in pic-speak) gotos and calls, you don't need to mess with
the PCLATH register. if you do computed gotos by writing to PCL, you might
have to mess with it, even within a 2k page, depending on the 256
byte-segment your table is in. if you do inter-page calls and gotos, you
always have to mess with it.

ge

1999\02\24@013827 by w. v. ooijen / f. hanneman

picon face
> Whats the deal with the 256byte memory segments.. They are not page
> boundries are they? i.e. why does it matter if i have a data table
crossing
> its boundy?
A data table is implemented in code.

> Also... since 11 bits is enough to address 2K, why does one have to mess
> with the PCLATH register when do inter-segment goto's /calls.
You don't have to.

(on the 16c and 16f) PCLATH is used only for calculated jumps: when you
manipulate
the PCL (at addres 2) directly the higher bits are taken from PCLATH. This
is what
you do for a data table: a calculated jump (ie add something to PC),

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