Let's try a test:If you hook the opto-isolator up as in the attached drawing, what does the Ohm meter read.If you then disconnect pin 1 of the opto-isolator from +5V what does the Ohm meter read.
50 ohms resistor is fine here, if you want it could be even smaller.AVR 328 tech sheet;-Absolute Maximum Ratings:DC Current per I/O Pin: 40.0 mABut here is continuous DC current not pulse.
It reads 137 Ohm and then wen I disconnected pin1 it shows 0 Ohm
Sorry this is rubbish. The ATmega's pins are not rated for pulses so although damage due to heat can be mitigated with a short pulse the two other damage mechanisms can not. These are :-1) Mechanical strain on the bonding wires due to the magnetic field the pulsed signal generates interacting with other fields.2) Depletion of charged carriers in the doped substrate.Ratings in a data sheet are there for a reason and only an idiot would make up stuff around absolute ratings.
There is no abs max rating for pulse output from the pin, you use 40mA as the abs max if youwant to play safe. 100ms is a long time for a single output pad on a microcontroller (pad diearea perhaps 0.001 sq mm), probably reaches thermal equilibrium in a couple of ms.
...It is clear that you think you know more that you actually do. This forum is not a haven for those sorts of people. Please learn what this forum is about before posting any more rubbish....
...Wrong. Please do not lie to us. Some of us know a vast wisdom about electronics. You are wrong. You should stop lying to people here. Someone might believe your garbage.
This is a stress rating only and functional operation of the device at these or other conditions beyond those indicated in the operational sections of this specification is not implied.