Searching \ for 'Converting from 16C57 to 16C63A' 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=16C
Search entire site for: 'Converting from 16C57 to 16C63A'.

Truncated match.
PICList Thread
'Converting from 16C57 to 16C63A'
1999\11\04@134751 by Peter Keller

flavicon
face
I redesigned an old project and replaced the 16C57 by the 16C63A, to
have more memory for future expansion.
I use the same ports for the same signals as before.
I redefined the header file as P16C64A.
Then I assembled the file and got a bunch of warnings and messages.
What else do I have to look for ?
Has anybody any experience with this ?
Peter

1999\11\04@142736 by William Bross

flavicon
face
Hi Peter,

I'll bet you are getting a bunch of errors pertaining to invalid memory
pages.  The C57 has four 512 byte pages where the C63A has two 1K pages.
This would be the first problem you need to address.  The next thing you
must do is disable all the nifty peripherals like the interrupts, uart, pwm
and extra counters.

Also, make sure if you are putting your app into a 63A (28 pin) you use the
include file for it and not the 64A (40 pin).  It has extra ports.

If I had my druthers and < ha ha> schedule and $$ permitting, I would
modify the code to use interrupts and maybe some of the goodies.  You may
be surprized at how much more efficient your app could be made.

Good Luck,
Bill

1999\11\04@143927 by Peter Keller

flavicon
face
Hi Bill
thanks for your fast help.

William Bross schrieb:

> Hi Peter,
>
> I'll bet you are getting a bunch of errors pertaining to invalid memory
> pages.  The C57 has four 512 byte pages where the C63A has two 1K pages.

What to do with the program memory and the larger banks ?

>
> This would be the first problem you need to address.

sorry I didnt' mention, I move the data memory starting at $08 originally to
$20 and the
invalid memory warnings disapeared.
The remaining warnings are:
TRIS PORT_A   Warning: Use of this instruction is not recommended (so how to
replace ?)
and
Message: Using default destination of 1 (file)

> The next thing you
> must do is disable all the nifty peripherals like the interrupts, uart, pwm
> and extra counters.

except timer nothing else used.

>
>
> Also, make sure if you are putting your app into a 63A (28 pin) you use the
> include file for it and not the 64A (40 pin).  It has extra ports.

checked !

>
>
> If I had my druthers and < ha ha> schedule and $$ permitting, I would
> modify the code to use interrupts and maybe some of the goodies.  You may
> be surprized at how much more efficient your app could be made.

It's not my code, but I have to expand it in the future.
Anyway, the first step is to run the new board with the new pic and the old
software.

>
>
> Good Luck,
> Bill

1999\11\04@153023 by William Bross

flavicon
face
snip
>The remaining warnings are:
TRIS PORT_A   Warning: Use of this instruction is not recommended (so how to
replace ?)
and
Message: Using default destination of 1 (file)
>snip

Hi Peter,

replace :
       tris    PORT_A
with:
       ; set page bit
       ; move literal or register value for PORT_A into W
       ; move W into TRIS_A    register
       ; clear page bit

As far as the default destination value, it is just an annoying reminder of
where your result ends up.  A default dest of '0' places the result in the
W reg and a default dest of '1' places the result back into the file register.

You can make these warnings invisible by adding a line at the beginning of
your program:
               errorlevel XXX

where XXX is the error # you wish to silence.

Hope this helps

Bill

1999\11\04@154524 by Peter Keller

flavicon
face
Bill

William Bross schrieb:

{Quote hidden}

seems to be clear

{Quote hidden}

o.k.

>
> Hope this helps
>

sure and thanks again.
I will proceed tomorrow.
Peter

>
> Bill

1999\11\04@155827 by paulb

flavicon
face
Peter Keller wrote:

> The remaining warnings are:
> TRIS PORT_A   Warning: Use of this instruction is not recommended (so
> how to replace ?)

 This one's easy.  Edit *all* the P16C6x.INC files in the MPLAB
directory, or if your lazy, just the P16C63.INC file, to add as the 4th
line:
       ERRORLEVEL -224

.. and the message will miraculously dissapear.  The assembler bug is
*fixed* permanently (unless you replace the file someday and it comes
back to bite you!).  Easy enough?

> Message: Using default destination of 1 (file)

 Add:
       ERRORLEVEL -305

.. to your source file.  I'm not sure what this means, someone else may
explain.  Either way, it doesn't stop anyhing working.
--
 Cheers,
       Paul B.

1999\11\04@160923 by paulb

flavicon
face
William Bross wrote:

> Hi Peter,

> replace :
>         tris    PORT_A
> with:
>         ; set page bit
>         ; move literal or register value for PORT_A into W
>         ; move W into TRIS_A    register
>         ; clear page bit

 Please don't!  A *complete* waste of time.  Just fix the ERRORLEVEL
and use the original code which was designed correctly.  Who wants code
bloat?

> As far as the default destination value, it is just an annoying
> reminder of where your result ends up.  A default dest of '0' places
> the result in the W reg and a default dest of '1' places the result
> back into the file register.

 Ah yes, now I see.  OK, I amend my previous suggestion.  *DON'T* put
ERRORLEVEL -305 in the source file.  The include file contains
definitions of W and F.  *USE THEM* in all file instructions where this
reminder occurs.  It is explaining to you that a ",F" is missing from
each of the instructions, so edit that in.

  *Never* use the values 0 or 1, you are asking for deep, deep trouble.
What's the deepest, deep trouble you can have with your program?  Well,
in all probability, that problem where you spend hours (days?) looking
through a piece of code which you *know* works perfectly because you've
worked it through, step by step, hundreds of times, but ... you just
forgot each time what the "1" or "0" meant, or just sort of thought that
it defaulted to using W.
--
 Cheers,
       Paul B.

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