Don't forget stack depth only 2 calls ! regards, Graham Daniel. James Cameron wrote: > > 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 (james.cameron@digital.com) > Digital Equipment Corporation (Australia) Pty. Ltd. A.C.N. 000 446 800