It means you don't have the PCM compiler installed, or you don't have
the 16F877 selected in MPLAB, or in the CCS IDE. You've got to learn
how to use the compiler before you do a project.

Quote:

when I want to use the example code

If I want to use a push button of RB4 in ICD3 how can I manage that ?

The ICD3 programmer doesn't affect anything about using RB4 as an
interrupt. It's completely an unrelated topic. To use RB4, you would
have to use the #int_rb interrupt. But in the 16F877, this interrupt works
for pins B4-B7 all at the same time. You can't enable it for just one pin.
At your level of knowledge, this is too difficult. I suggest you use pin B0
with #int_ext. The #int_ext interrupt only uses Pin B0, and is much
easier for you to do.

znses

Joined: 15 Apr 2011Posts: 9

Posted: Tue May 10, 2011 1:22 pm

Regarding the error : Error 128 "C:\Users\kustaff\Desktop\bunage\T.c" Line 4(1,70): A #DEVICE required before this line

I ensured that all your step for detecting this error are confirmed but I still get this error despite I have been programming other codes and it worked !

Regards

PCM programmer

Joined: 06 Sep 2003Posts: 19465

Posted: Tue May 10, 2011 1:28 pm

It compiles OK for me. I copy-and-pasted it into an existing project for
the 16F877 in MPLAB (I commented out the other code for that project)
and it compiled without errors.

If I change the PIC in MPLAB menu for "Configure / Select Device" to
something else like 18F452, then I get the same error as you.