Try it. Hook up a multimeter and measure the current through a LED without a resistor. The current will stay steady at the current limit, depending on which PIC. It certainly doesn't damage the IC, I do this all the time with many different PICs. That suggests to me that there is active current limiting going on, yes?
I actually did a similar test. I don't have any 18F of 16-bit PICs so I can't say for them.
But I do have some baseline and mid-range PICs to test on.
Test conditions:
- PICkit2 used for variable power supply
- PIC16F506, PIC16F616
- All peripherals disabled, output capable pins set as outputs and toggled every 3 seconds in code.
- Supply voltage was adjusted to show different SC currents
- DMM connected directly from one pin to supply then from one pin to ground.
Results:
5v on the 16F506: A HIGH pin would draw 29mA from ground. A LOW pin would draw 64mA from supply.
4v on the 16F506: A HIGH pin would draw 21mA from ground. A LOW pin would draw 50mA from supply.
3v on the 16F506: A HIGH pin would draw 12mA from ground. A LOW pin would draw 32mA from supply.
5v on the 16F616: A HIGH pin would draw 32mA from ground. A LOW pin would draw 64mA from supply.
4v on the 16F616: A HIGH pin would draw 24mA from ground. A LOW pin would draw 51mA from supply.
3v on the 16F616: A HIGH pin would draw 13mA from ground. A LOW pin would draw 32mA from supply.
The current would indeed stay the same, that is until you change the supply voltage.
The short-circuit current would change linearly with supply voltage.
That suggests there is no active current limiting and the short-circuit current is limited only by the Ron of the output fets and the resistance of internal connections.
At 5v, the low-side FET has roughly 78Ω of Ron, with a green/blue/white LED rated at about 3.2v, the LED would pull about 23mA, close to the rated current limit of the pin.
At 5v, the high-side FET has roughly 167Ω or Ron, with a green/blue/white LED rated at about 3.2v, the LED would pull about 10mA.
I did some actual tests with an LED in series with the DMM but didn't type the results out as they mirrored the math above.
The fact that the LED current stayed at the current limit was a pure coincidence as the FETs Ron was just enough to maintain that.
Any lower voltage LED (red, orange, yellow, lime green) would draw much more current.
To put it simply: There is no active current limiting circuitry on a baseline or mid-range PIC's output pin.
Though the tests did prove that the output FETs have enough Ron to limit LED current across most of supply voltage range.
If the OP needs to, he can forgo a series resistor and connect the LED from an output pin to ground as at 3v the Ron would be more than enough to limit the current.
I don't have any 18F or any 16-bit PICs so would anyone who does consider doing the test on them as well?