Problem solved: ![]()
The line TIMER1C , // PB 7 ** 13 ** PWM13 was missing from the pins_arduino.h file in the variants\mega folder of the install directory.
Open that folder, i.e....
C:\Program Files (x86)\Ardunio\hardware\ardunio\avr\varients\mega.
Delete or rename the pins_ardunio.h file, and replace it with the attached file (you may have to edit folder permissions to do this).
Now, provided you have disabled the TIMER0A output (OCOA) by setting COM0A1 & COM0A0 bits of the TCCR0A register to 0 and set either one or both of the COM1C1 & COM1C0 bits of the TCCR1A register to 1 (as applicable) you can now get a PWM output from TIMER1C (OC1C) on pin26 of the ATmega2560/Digital pin 13 of the Arduino Mega2560 board.
Thanks to MarkT for his reply which made me think there may be a problem with one of the files the IDE uses.
pins_arduino.h (13.8 KB)