I'm talking about the onboard LED. The one connecting to pin13 works fine.
The pin has a resistor.
The yellow LED onboard LED on the Mega is connected to pin 13.
Pin 13 on the header does not have a resistor between pin and micro controller.Show a schematic (photo/scan of a hand-drawn one is fine) and post the code that you use.On an official Mega, it's indirectly connected; there is an opamp that buffers.
I am looking at the schematic here https://www.arduino.cc/en/uploads/Main/arduino-mega2560-schematic.pdf?