Searching \ for '[PIC]: Please help! Global Calls and Global Gotos' 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/devices.htm?key=pic
Search entire site for: 'Please help! Global Calls and Global Gotos'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Please help! Global Calls and Global Gotos'
2001\07\05@164409 by Thomas N

picon face
Hi Olin,

Thank you for your quick response!  The code you wrote can be compiled under
MPLAB IDE, right? (I will try it tonight)

Let say I cut and paste your code into my project, will the code section
that I don't use get compiled into the program as well?

Do you have the code for the 16-Family only?

Thanks!
Thomas


{Quote hidden}

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamspam_OUTmitvma.mit.edu


2001\07\05@180627 by Olin Lathrop

face picon face
> Thank you for your quick response!  The code you wrote can be compiled
under
> MPLAB IDE, right? (I will try it tonight)

Yes, I use the official Microchip tools exclusively.

> Let say I cut and paste your code into my project, will the code section
> that I don't use get compiled into the program as well?

Depends on what it is.  Macro definitions don't create any code.  Note that
many of my macros are nested, so you may have to grab a lot of them.  Notice
also the various assembly symbols assumed, and that some of the code assumes
the linker is used.  I always include STD_DEF.INS.PAS and STD.INS.PAS in my
projects so I don't worry about what parts might or might not be needed by
what other parts.  You can see the HAL project as an example of how I use
these files and some of the macros.

> Do you have the code for the 16-Family only?

No, see STD_DEF.INS.ASPIC.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, @spam@olinKILLspamspamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
KILLspampiclist-unsubscribe-requestKILLspamspammitvma.mit.edu


2001\07\05@185827 by Thomas N

picon face
Thank you very much for your help, Olin
thomas


{Quote hidden}

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspammitvma.mit.edu


2001\07\07@120415 by Thomas N

picon face
"Tables, for instance, have to be placed in the first 128 (or 256?)
words of your current page..."

Really?  I didn't know this!  I thought I can place the table anywhere in
the memory.  Good to know
Thomas


{Quote hidden}

> >{Original Message removed}

2001\07\08@090614 by Olin Lathrop

face picon face
> "Tables, for instance, have to be placed in the first 128 (or 256?)
> words of your current page..."
>
> Really?  I didn't know this!  I thought I can place the table anywhere in
> the memory.  Good to know

Be careful.  That statement in general is not true.  On the 12 series parts,
you can only call into the first 256 locations of each page.  On other parts
there is no restriction.

Another source of confusion comes from the fact that some people think a
"table" means code like:

   addwf  pcl
   retlw  <value for table entry 0>
   retlw  <value for table entry 1>
   .
   .
   retlw  <value for table entry N>

This type of table is also not restricted to being in the first 256
locations of the current page.  It IS however restricted to being all on the
same block of 256 locations.  That's because the table index code (ADDWF
PCL) only adjusts the low byte of the address.  Any overflow from that ADDWF
is lost, causing the table to wrap back to the start of that block of 256.

You can have a RETLW table anywhere and of any size if your code adjusts
PCLATH properly.  On the F series parts you can read the program memory
directly, which allows for totaly different table structures.  These kind of
tables take a few more cycles to access and will use the EECON hardware, but
store 14 bits of data per program memory location instead of just 8.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, RemoveMEolinKILLspamspamembedinc.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.


2001\07\08@121135 by Dave Dilatush

picon face
Olin Lathrop <olin_piclistSTOPspamspamspam_OUTEMBEDINC.COM> wrote...

>On the F series parts you can read the program memory
>directly, which allows for totaly different table structures.  These kind of
>tables take a few more cycles to access and will use the EECON hardware, but
>store 14 bits of data per program memory location instead of just 8.

Unfortunately, not all the "F" series parts can do this.

I've been using this technique on the 'F877 to look up sine table
entries in a software-driven DDS audio signal generator; it works very
well and doesn't take significantly more cycles than the code for a
retlw-type table lookup routine written for large tables.

However, when I went to migrate this system to an 'F628, I discovered
that the 'F87x series are apparently the only parts (so far) to allow
program memory access through EECON.  On the 'F628, EECON can only
access data EEPROM, so I had to resort to retlw-type tables.

DD

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


2001\07\08@130906 by Bob Barr

picon face
Olin Lathrop wrote:
>
>You can have a RETLW table anywhere and of any size if your code adjusts
>PCLATH properly.  On the F series parts you can read the program memory
>directly, which allows for totaly different table structures.  These kind
>of
>tables take a few more cycles to access and will use the EECON hardware,
>but
>store 14 bits of data per program memory location instead of just 8.
>

Is this possible on earlier F parts such as 16F84 or only with the newer
ones (16F87x, 16F62x etc)?

If 14-bit reads of program memory can be done on the 16F84, I can save a TON
of code space on a project that I'm currently working on.


Regarding the 16F627/628: The data sheet looks great but are these parts
really available for purchase yet? Neither the Digikey online catalog nor
the Microchip online store indicates that they are. (The status on them
elsewhere on the Microchip site has them listed as "New Device".)

Thanks, Bob

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

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


2001\07\08@131741 by Spehro Pefhany

picon face
At 01:09 PM 7/8/01 -0400, you wrote:

>Regarding the 16F627/628: The data sheet looks great but are these parts
>really available for purchase yet? Neither the Digikey online catalog nor
>the Microchip online store indicates that they are. (The status on them
>elsewhere on the Microchip site has them listed as "New Device".)

They are in stock at Digikey, a few thousand each of the more popular ones,
at the moment.

Best regards,

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Spehro Pefhany --"it's the network..."            "The Journey is the reward"
spamBeGonespeffSTOPspamspamEraseMEinterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Contributions invited->The AVR-gcc FAQ is at: http://www.bluecollarlinux.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

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


2001\07\08@132811 by Bob Barr

picon face
Spehro Pefhany wrote:

> >Regarding the 16F627/628:
>
>They are in stock at Digikey, a few thousand each of the more popular ones,
>at the moment.

Thanks for that info. I couldn't find them in their online catalog. I'll
give them a call tomorrow.

Bob

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

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


2001\07\08@133852 by Spehro Pefhany

picon face
At 01:28 PM 7/8/01 -0400, you wrote:

>Thanks for that info. I couldn't find them in their online catalog. I'll
>give them a call tomorrow.

In the "Parts Search" window, enter PIC16F628 (or PIC16F627) and you will
get all
the listings and quantities in stock. Their descriptions are not always
perfect.

Best rgards,
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Spehro Pefhany --"it's the network..."            "The Journey is the reward"
KILLspamspeffspamBeGonespaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Contributions invited->The AVR-gcc FAQ is at: http://www.bluecollarlinux.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

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


2001\07\08@153537 by Dale Botkin

flavicon
face
On Sun, 8 Jul 2001, Bob Barr wrote:

> Regarding the 16F627/628: The data sheet looks great but are these parts
> really available for purchase yet? Neither the Digikey online catalog nor
> the Microchip online store indicates that they are. (The status on them
> elsewhere on the Microchip site has them listed as "New Device".)

I have bought several 16F628's from Digi-Key, they were in stock.  In
fact, they now show over 3K -20/P in stock, along with lots of others.
$3.88 for the -20/P, qty 1.

Dale
--
A train stops at a train station.  A bus stops at a bus station.
On my desk I have a workstation...

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


2001\07\08@172145 by Bob Barr

picon face
Dale Botkin wrote:
>
>I have bought several 16F628's from Digi-Key, they were in stock.  In
>fact, they now show over 3K -20/P in stock, along with lots of others.
>$3.88 for the -20/P, qty 1.
>

Thanks to all who have responded on this question.

I now know that I should use the 'parts search' feature rather than count on
Digikey's catalog pages being up-to-date.

BTW, that sig line of yours is great, Dale.

Regards, Bob

>A train stops at a train station.  A bus stops at a bus station.
>On my desk I have a workstation...
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

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


2001\07\08@175549 by Dale Botkin

flavicon
face
On Sun, 8 Jul 2001, Bob Barr wrote:

> Dale Botkin wrote:
> >
> >I have bought several 16F628's from Digi-Key, they were in stock.  In
> >fact, they now show over 3K -20/P in stock, along with lots of others.
> >$3.88 for the -20/P, qty 1.
> >
>
> Thanks to all who have responded on this question.
>
> I now know that I should use the 'parts search' feature rather than count on
> Digikey's catalog pages being up-to-date.

Yeah.  You often have to be overly broad aout your searches, too.
Sometimes you will miss parts that are there by specifying, for example,
"red" as an LED color, when the one you really wamnt is described as
"clear red" or "diffused red" or some such.  It's usually only a problem
when narrowing the search usingtheir drop-down selection boxes.

> BTW, that sig line of yours is great, Dale.

<chuckle>...  I stole it from a friend.

Dale
--
A train stops at a train station.  A bus stops at a bus station.
On my desk I have a workstation...

--
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 2001 , 2002 only
- Today
- New search...