1) You have the pin set for both edges for interrupting, if you want rising edge, then you will need to change it to rising edge for proper interrupt handling.
2) You will want to set the pin drive mode to one of the High Impedance Digital States (The IDE doesn't prevent incompatible pin drive versus input modes).
3) This would be working as expected.
4) Floating input signals will be pretty random and useless, a floating input signal doesn't help with diagnostics.
You forgot to set your circular counter cc to be volatile (since it is modified in an ISR)
The LED will always be on from the code in the program, if you want the LED to follow the ZCD, then just set it high/low based on the pin setting to start with. It looks like you were wanting it to "update" the LEDs on/off timing based on a "Power" variable, so I will attempt to do that
To have the LED dim/brighten, you will need to pulse the LED with either the counter in the ISR, or using a PWM to control it's brightness.
I made changes to the project as I mentioned above, but I am not sure what you were wanting the LED to do. I would assume you can figure that out once the ISR is working properly however.
ZCD_PWM_Test.cyprj.Archive01.zip 696.6 K