A program written for a PIC16F84 can be burnt into a PIC16F628 providing:
1. These lines at the beginning of your program specify a PIC16F628: list p=16F628
include "p16f628.inc"2. These instructions are placed in SetUp:
bsf status,rp0
xxxxxxx
bcf status,rp0 ;select programming area - bank0
movlw 07h ;turn comparators off and enable
movwf cmcon ; pins for I/O functions
3 Files in the PIC16F84 start at 0Ch Files in the PIC16F628 start at 20h. This means files 0Ch, 0Dh, 0Eh, 0Fh, 10h, 11h . . . . 1Fh must be transferred to the General Purpose Register area: 20h to 6Fh.
4. The "p16f628.inc" file is in the same folder as your .asm file.
5. MPASM (the program that converts .asm to .hex) specifies 16F628 as the processor.