i want to know what happen if i put ac signal in analog channel without giving offset,did negative part of signal damage my port pins ? in my project i m only interested to read positive peak.
If you did this and things still work you may experience problems down the line.
Always apply voltage to inputs within the limits according to the devices data sheet.
That said have some spare controllers on hand.
Depends on the current capability of the source.
If input current stays under 1mA, the internal protection diode protects the input.
It might be wise to add an external (schottky) diode between input pin and ground.
Cathode (ring) to input pin.
Post your schematic, or at least the part that connects to the pin.
You can also damage the "signal". i.e. If you short-out the negative half of an audio signal you are distorting it.
A 10K resistor in series with the input should keep the current down to a safe level (and assuming a low-impedance source) the series resistor will also protect the signal.