analogWrite() qui utilise le timer0
Je n'avais pas compris comme cela , (mais c'est pas pour autant que j'ai raison) :
Merci d'avoir lancé ce sujet il est très intéressant.
• INT1/OC2B/PCINT19 – Port D, Bit 3
INT1, External Interrupt source 1: The PD3 pin can serve as an external interrupt source.
OC2B, Output Compare Match output: The PD3 pin can serve as an external output for the
Timer/Counter0 Compare Match B. The PD3 pin has to be configured as an output (DDD3 set
(one)) to serve this function. The OC2B pin is also the output pin for the PWM mode timer
function.
PCINT19: Pin Change Interrupt source 19. The PD3 pin can serve as an external interrupt
source.
• MOSI/OC2/PCINT3 – Port B, Bit 3
MOSI: SPI Master Data output, Slave Data input for SPI channel. When the SPI is enabled as a
Slave, this pin is configured as an input regardless of the setting of DDB3. When the SPI is
enabled as a Master, the data direction of this pin is controlled by DDB3. When the pin is forced
by the SPI to be an input, the pull-up can still be controlled by the PORTB3 bit.
OC2, Output Compare Match Output: The PB3 pin can serve as an external output for the
Timer/Counter2 Compare Match. The PB3 pin has to be configured as an output (DDB3 set
(one)) to serve this function. The OC2 pin is also the output pin for the PWM mode timer
function.
A ce que je comprend de la datasheet j'ai l'impression que la pmw obtenue à partir du port B utilise le timer 2 et que celle obtenue à partir du port C utilise le timer 0.
En fait il faudrait un timer différent par port.
Les deux sont des timers 8 bits, seul le timer 1 (16bits) semble totalement libre.
Aurais-je raison ou me mettais-je le doigt dans l'oeil jusqu'au coude ?