Hi Guru's,
I have come across something weird. I have a bit of code on an Atmega2560 that does three things: is initialises two timers in CTC mode, it initialises the SPI port to talk to an SD card and it enables the SD card interface chip by setting PB5 high. This port pin is on the same port (B) as the SPI interface and the secondary function of this port pin is OC1A.
The following code initialises things:
void main( void ) { /* init SPI interface */ DDRB = (1