If I use, say, an ATTiny 85 with the internal R/C clock, then pins 2 and 3 (XTAL1 and XTAL2) are available for use as PB3 and PB4.
The datasheet says:
If some pins are unused, it is recommended to ensure that these pins have a defined level. Even though most of
the digital inputs are disabled in the deep sleep modes as described above, floating inputs should be avoided to
reduce current consumption in all other modes where the digital inputs are enabled (Reset, Active mode and Idle
The simplest method to ensure a defined level of an unused pin, is to enable the internal pull-up. In this case, the
pull-up will be disabled during reset. If low power consumption during reset is important, it is recommended to use
an external pull-up or pull-down. Connecting unused pins directly to VCC or GND is not recommended, since this
may cause excessive currents if the pin is accidentally configured as an output.
My application uses pins 5, 6 and 7 (PB0, 1 and 2). Two of these I have connected to VCC via a 100K resistor and one to GND through a 100K resistor (this pin drives a BJT base through a 220 ohm resistor and I want that pin to be low when it's not being driven).
So, my question is this: What should I do with the two unused crystal pins:
- Pull up to VCC or pull down to GND via a 100K
- Leave them open
- Enable the internal pull-ups (pin high, DDR as input)
Note that this is a low power application. It runs from a 3 volt lithium coin cell and is always asleep unless pin 7 (PB2, INT0) is pulled down with a pushbutton. Then it wakes up, does it's thing for about 150 msec, then goes back to sleep.
The AVR is set to fully asleep [ set_sleep_mode(SLEEP_MODE_PWR_DOWN); ]
I want to "handle" the unused pins in a manner that draws the least current (obviously).
Any advice will be appreciated.