I am wondering if this could be the case for an ATtiny84 which has some common pins used for both SPI and TWI (they are part of a so called USI - Universal Serial Interface).

Basically I am asking this question - SPI and pull-up resistors with a few changes:

  • SPI mode will only be used for programming the chip, then only TWI mode.
  • The voltage problem is not there: everything will run at 3.3V
  • 1
    \$\begingroup\$ Shouldn't be a problem if your programmer does not have extremely weak outputs (unlikely). AVR can pull down I2C resistors in TWI mode, so the same pin should not have any issue pulling them down in SPI mode neither. \$\endgroup\$ – Martin Apr 23 '17 at 13:02

The SPI port contains four bidirectional logic lines. All drivers are strong enough to overcome pull-up resistors, such as those for TWI mode.

So what you are planning to do is fine.

  • 1
    \$\begingroup\$ The pullup resistors shouldn't be a problem, but attached TWI peripherals conceivably could be, if part of the programming sequence coincidentally resembles something they should respond to closely enough that they do so. \$\endgroup\$ – Chris Stratton Apr 23 '17 at 15:51
  • \$\begingroup\$ That's true, @ChrisStratton, though the OP's question was electrical, not protocol. Put that to the OP, comment it on their question above. \$\endgroup\$ – TonyM Apr 23 '17 at 15:58
  • \$\begingroup\$ The comment is on the second part of your answer, the conclusion going beyond the asked question, which overlooks this potential issue. \$\endgroup\$ – Chris Stratton Apr 23 '17 at 16:36
  • \$\begingroup\$ Don't see that, @ChrisStratton. OP is clearly aware of protocols in the question. Asks just about pullups/voltages, references another question about pullups/voltages and I answered about pullups/voltages. Nothing's overlooked, you chucking out a 'conceivably' problem doesn't make it a new part of the question or answer. Answer what's asked. \$\endgroup\$ – TonyM Apr 23 '17 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.