I've noticed that when using the USI interface on the ATTiny to send I2C via the methods from "Wire.h" with the ATTiny Arduino implementation included from the library manager (ATTinyCore), while analogWrite
PWM on PB4 (Arduino pin 4, physical pin 3) works OK, it seems attempting to use it on PB1 (Arduino pin 1, physical pin 6) behaves erratically or hangs the processor.
Is this expected behavior, and is there a workaround? With the SDA
line on PWM pin 0, physical pin 5 if that's the case it means when using the hardware USI to do I2C communications, I'm down to a single hardware PWM output, which is kind of a bummer.
millis()
which I believe does something with an interrupt on one of the two hardware timers, so I wonder if that might be part of the problem as well, though I was under the impression that firing a timer overflow interrupt wouldn't interfere with the PWM channels. I plan on breaking the situation down into bare-minimum sketches today to try and isolate the problem – Bitrex Jan 8 '18 at 13:35