Getting 1 MHz signal from attiny85

I want to get the internally generated clock signal (1Mhz) out from one of the pins. I found a description for Uno (ATMEGA328p): Arduino 1 MHz/ 2MHz / 4MHz / 8 MHz CLOCK OUTPUT - Programming Questions - Arduino Forum

I struggle to find out which registers to set in the code on the attiny platform, as it seems that it has different registers? Which of the output pins is not critical to me.

You need to set (or actually clear) the CKOUT fuse-bit in order to get the clock signal on pin 3 (PB4), refer the spec sheet page 148/149.

The ATtiny datasheet will tell you the names of the registers and what each of the bits do.

TCCR1– Timer/Counter1 Control Register
GTCCR– General Timer/Counter1 Control Register
OCR1A –Timer/Counter1 Output Compare RegisterA

johnwasser:
TCCR1– Timer/Counter1 Control Register
GTCCR– General Timer/Counter1 Control Register
OCR1A –Timer/Counter1 Output Compare RegisterA

Exately how is this going to help getting the internal clock signal to a pin?

EDIT: Oh, you want to use Timer1 to output the clock as PWM? Also possible if Timer1 is not used for something else :slight_smile: