Arduino Micro OCR1C At Pin 11 instead OCR0A - SOLVED

How can I generate a pwm signal trought Pin 11 with timer 1C? ( arduino Micro board) thanks in advance!

analogWrite(11, value);

Sorry, I mean that I need a PWM signal trough OC1C pin. I think analogWrite() use OC0A by default.

You said Pin 11. That is how you get PWM on Pin 11 on that board (or any other board). I would expect it to use OCR1C internally.

My problem is that I need a 16 bit PWM signal trough pinD11 (PB7) using timer1 instead timer0 (used by default). Is that possible?

You could setup the timer control registers yourself to enable toggling on
that pin for that timer - analogWrite () is table driven from pins_arduino.h in
the relevant variants dir, so you could change that.

Solved!!! :slight_smile: tomorrow I'll post the code.

Here we are:

void setup(){
pinMode(11, OUTPUT);
pinMode(10, OUTPUT);
// Sets registers
TCCR1A = ((1 << COM1B1) | (1 << COM1C1) | (1 << WGM11) | (1 << WGM10));
TCCR1B = ((1 << WGM13) | (1 << WGM12) | (1 << CS10));
}
void loop(){
// Duty cycles values
OCR1C = val1; 
OCR1B = val2;
}