Hi AndrijaD,
It sounds more like you are getting interference from the spark plug. This can be a "challenge" to eliminate. First, I would hope you have your project in a sealed, metal box that is grounded? It may be necessary to use only "feed-thru" capacitors on any wires going into or out of the box. You could also add 3 capacitors as close to pins 19 and 20 (PIC power and ground), one of which is a .1mfd, and a 10 mfd tantalum, and 100 mfd tantalum. Why 3? Simple. Capacitors are like resistors (Called Xc) to AC (noise) and since the frequency of the noise will change with the RPM, you want to make sure one of the capacitors looks like a short to ground for the noise. Other techniques and tactics is to take your wires and twist them together in the end of an electric drill so they will "shield" each other. Hope this will give you a "start". Best, Ed