bank memory 16f648
1. If using PORTA pins as interfacing I/O, you need to define/set the I/O function for PIC16f628:
CLRF PORTA
MOVLW 0x07 ; turn comparators off and
MOVWF CMCON ; enable pins for I/O functions
2. Always refer to data memory MAP (on Pic datasheet) to ensure that the general purpose register used not out of range when migrate one type of MCU to another type of MCU. As example, general purpose register for:
Pic16f84 : 0x0C to 0x4F (at bank 0).
Pic16f628: 0x20 to 0x7F (at bank 0),
0xA0 to 0xEF (at bank 1),
0x120 to 0x14F (at bank 2).
Pic16f648: 0x20 to 0x7F (at bank 0),
0xA0 to 0xEF (at bank 1),
0x120 to 0x16F (at bank 2).
CD