Нашел в интерете
документацию по работе ICD2 с некоторыми контроллерами.
В ней сказано:
Цитата
If PIC16F627A or PIC16F628A devices are selected for MPLAB ICD 2 development in
MPLAB IDE, the warning “ICDWarn0020: Invalid target device id” may be received in
the build window and as a dialog. The reason is the PIC16F648A-ICD device supports
PIC16F648A, PIC16F627A and PIC16F628A, but only reports the device ID for the
PIC16F648A.
Ignore this warning or disable it under the Warnings tab on the ICD Programming
dialog.
Т.е. ошибка из-за того, что вместо своего идентификатора микроконтроллер PIC16F628A выдает идентификатор для PIC16F648A. Решение проблемы - игнорировать или отключить это сообщение об ошибке.