Go Down

Topic: Can miso and mosi pins be used on ATTiny84 without interfering with arduinoISP? (Read 683 times) previous topic - next topic

MatCat

I want to use 3 of the 4 pwm pins on an ATTiny84 however miso and mosi are both pwm pins, will using either as pwm pins interfere with programming the chip?

baselsw


I want to use 3 of the 4 pwm pins on an ATTiny84 however miso and mosi are both pwm pins, will using either as pwm pins interfere with programming the chip?


Shouldn't..

Tom Carpenter

Nope. When the ISP takes over, it pulls the Reset pin low to do programming. In this state, all the pins (apart from MISO) are forced to high-impedance inputs.
~Tom~

MatCat

BUT what pin is it using to tell the 84 to reset? mosi, clk, or miso?  It has to use ONE of them to initiate the reset :)  I was reading over the datasheets and it would seem the clock pin would actually be the trigger for turning ISP on?  If that is the case then mosi and miso are both usable PWM streams, otherwise if it uses mosi pin then how would it send a reset command if a PWM stream was coming out of it? :)

Tom Carpenter

it uses the Reset pin. (Pin4 on the IC, aka PB3). Basically if you hold the reset pin low, you can use SPI to program the flash memory, which is why if you disable the reset pin, you can no longer use ISP.
~Tom~

MatCat

Hrm... AH YES you are right, the reset pin goes to the UNO, I forgot about that in the wiring!  Awesome.

Go Up