voltage level

Hello all,
In my project I used a pic 12F675 to generate a 1s clocksignal.
This signal was strait connected to pin 2 of my uno to generate an interrupt.
Everything worked all right for a time,then my 12F675 blew up.
I realized the uno can source/sink more current then the 12F675 therefore I connected a 5.6 k resistor in the line.
If I measure voltage at pin 2 it varies between 4.32 and 4.34 V, so pin2 is internally pulled up.
The other side of the resistor varies between 0 and 5 V as expected.
Pin 2 is defined by “attachInterrupt(digitalPinToInterrupt(2),routine,FALLING);”
I also tried adding pinMode(2,INPUT); the compiler found this okay but downloading to the uno did not work.
Please can anyone tell me what I do wrong
Hans

I realized the uno can source/sink more current then the 12F675 therefore I connected a 5.6 k resistor in the line.

That's probably not the source of your problem.

If I measure voltage at pin 2 it varies between 4.32 and 4.34 V, so pin2 is internally pulled up.

It isn't by default, if it is pulled up, then your code tells it to do so. Post your complete code!

I also tried adding pinMode(2,INPUT); the compiler found this okay but downloading to the uno did not work.

What does that mean? Code that compiles can be uploaded to the Arduino if the size fits and the correct parameters are chosen (serial port, board, etc.). What error do you get?

You didn't, by chance, set pin 2 to OUTPUT and LOW while the PIC was driving however much current it can output into it, did you?

To outsider, thank you for your answer.
I did not set pin 2 to output

pylon:
That's probably not the source of your problem.

It isn't by default, if it is pulled up, then your code tells it to do so. Post your complete code!

What does that mean? Code that compiles can be uploaded to the Arduino if the size fits and the correct parameters are chosen (serial port, board, etc.). What error do you get?

[Pylon, thank you for your answer, i agree with the source/sink not being the source as pin 2 being made input, yet it happens]
I sent the complete code in a attachment.
downloading after compiling went all right this time, when i did this yesterday downloading went on indefenite. The voltagelevel on pin 2 keeps high. If I put in a smaller resistor i see a bigger voltage difference as expected.

As you can see from my program I try to make a course controller for my boat

restore_offsets-180404a.zip (37.7 KB)

Code as 38 kB zip... Sorry, that's WAY too much code to track down a problem when I don't even really understand what to look for.

Please create a minimal example sketch that showcases your problem, then post it on this forum. That's going to be a lot easier to work on.

And a circuit diagram of course.

All variables used in interrupts must be declared volatile otherwise the compiler might optimize them away.

Thank you all for your replies, soory for having to wait so long for my reply.
The problem is solved, it is a hardwarefault, i made a small set up with a nano and that worked as expected.