Searching \ for 'Q: 16F84 to 12C509 porting checklist' 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/ios.htm?key=port
Search entire site for: 'Q: 16F84 to 12C509 porting checklist'.

Truncated match.
PICList Thread
'Q: 16F84 to 12C509 porting checklist'
1998\06\26@220115 by James Cameron

picon face
I prototype on 16F84 and move the final to OTP 12C509A's.

I've been building a checklist for moving code from PIC 16F84 to PIC
12C509A and would appreciate other's comments.  What have I missed from
the list?  Some of them are obvious; don't use 16F84 features.  But it's
the strange ones that are likely to be missed.

I would expect most processor specific code would be placed in IFDEF
sections,
testing for the processor symbols __12C509A or __16F84.

The checklist;

- include P12C509A.INC instead of P16F84.INC,
- check __CONFIG flags,
       - use of MCLRE,
       - no use of PWRTE,
       - valid oscillator configuration,
- check code for no use of instructions SUBLW, ADDLW, nor RETFIE,
- check code for no use of register addresses PORTA, PORTB, EEDATA,
EEADR, PCLATH, INTCON, EECON1, nor EECON2,
- check code for no use of STATUS bits IRP, RP1, nor RP0,
- check code for OPTION register,
       - no use of OPTION_REG,
       - use of OPTION instruction,
       - no use of OPTION_REG bits RBPU nor INTEDG,
- check register file addresses used do not exceed limits (valid range
is 0x07 to 0x1f and 0x30 to 0x3f, addresses below 0x0c are in use on
16F84 anyway, so this is the first common free address),
- check code for TRIS register,
       - no use of TRISA nor TRISB,
       - use of TRIS,
- if using _IntRC_OSC,
       - clock may drift, check any external timing assumptions,
       - check first instruction is MOVWF OSCCAL,
       - check 0x3ff is not to be programmed (contains MOVLW for OSCCAL),
- if not using _MCLRE_OFF,
       - check GP3 is not used,

--
James Cameron                              (spam_OUTjames.cameronTakeThisOuTspamdigital.com)
Digital Equipment Corporation (Australia) Pty. Ltd. A.C.N. 000 446 800

1998\06\27@004909 by Michael Ghormley

flavicon
face
<SNIP of James Cameron's 16C84 to 12C5XX porting checklist>

I would add that the TOCS bit of the OPTION register must be a '0' for
GP2 to be an output.  Even if the TRIS register has the GP2 bit set to
'0', the TOCS bit overrides it.  This was my first curve back when I
started with these chips.

Michael

REMOVE THE .NS (NO SPAM) FROM MY ADDRESS TO REPLY
*************************************************************************When th
e way of the Tao is forgotten, kindness and ethics must be taught.
Men must learn to pretend to be wise and good.  --  Lao Tzu
*************************************************************************

1998\06\27@022457 by Dwayne Reid

flavicon
face
>
>I prototype on 16F84 and move the final to OTP 12C509A's.
>
>I've been building a checklist for moving code from PIC 16F84 to PIC
>12C509A and would appreciate other's comments.  What have I missed from
>the list?  Some of them are obvious; don't use 16F84 features.  But it's
>the strange ones that are likely to be missed.

Got one more for your list (and it can be a biggie): RETURN

MPASM substitutes RETLW 00 in place of RETURN - this means not being able to
pass variables from subroutines back to the caller.

dwayne


Dwayne Reid   <.....dwaynerKILLspamspam@spam@planet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(403) 489-3199 voice     (403) 487-6397 fax

1998\06\27@082442 by g.daniel.invent.design

flavicon
face
Don't forget stack depth only 2 calls !
regards,
Graham Daniel.

James Cameron wrote:
{Quote hidden}

1998\06\28@164712 by Marc Hoffknecht

picon face
Note that the FSR register is not an eight-bit-register on the 12c509. On
the 16c84 you can use it as a (temporary) register if you run completely out
of memory. On the 12c509 the uppermost bit is always set.

Marc

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