In real (tested with Arduino Uno), the LED on pin 10 is blinking fast. In simulation nothing happens.
#ifndef F_CPU
#define F_CPU 16000000UL // 16 MHz clock speed
#endif
int main(void){
DDRB |= (1 << PORTB2); //Define OCR1B as Output (pin number arduino: 10)
TCCR1A |= (1 << COM1A0) | (1 << COM1B1) | (1 << WGM10); // PB2: output, PWM mode 9
TCCR1B |= (1 << CS10) | (1 << CS11) | (1 << WGM13);// prescaler=64, mode 9
OCR1A = 4000;
OCR1B = 1000;
while(1) {
}
}
In real (tested with Arduino Uno), the LED on pin 10 is blinking fast. In simulation nothing happens.