user35142: I have an arduino mini with an ultrasonic sensor conected to the pins 2 and 3, and a RGB LED connected to the 4,5, and 6, I want to include a wake up and sleep functionality that wakes up when receive a high signal in another pin as 7.
I have seen that normaly the pins for that are 2 and 3, as in the arduino web: Arduino sleep web
But can it be done with another pin?

user-1: Arduino Mini has only two interrupt capable pins: 2 and 3. You have to move your sensor to other pin.
From the AtMega328p datasheet:

If a level triggered interrupt is used for wake-up from Power-down,
  the required level must be held long enough for the MCU to complete
  the wake-up to trigger the level interrupt. If the level disappears
  before the end of the Start-up Time, the MCU will still wake up, but
  no interrupt will be generated. The start-up time is defined by the
  SUT and CKSEL Fuses.


user4143: As well as the normal external interrupts INT0 and INT1 you can also wake the chip through a variety of other interrupts. One of those is the pin change interrupt.
In the datasheet is a table of what is available in the different sleep modes, and what can wake you from that sleep mode. I have compressed the table to remove a lot of the stuff you don't care about at the moment and just show the "wake-up sources":

As you can see both INT and PCINT can wake from all modes (along with TWI [Wire.h] slave mode address matching).
The note (3) on the table just says that for INT0 and INT1 it must be a LOW level interrupt, not a RISING or FALLING. No mention is made of the type of interrupt for PCINT.
So yes, since pin 7 has PCINT facilities (all pins on the ATMega328P have PCINT) you can configure that as a wake-up source and wake the MCU using pin 7.

35142: <p>I have an arduino mini with an ultrasonic sensor conected to the pins 2 and 3, and a RGB LED connected to the 4,5, and 6, I want to include a wake up and sleep functionality that wakes up when receive a high signal in another pin as 7.</p>

<p>I have seen that normaly the pins for that are 2 and 3, as in the arduino web: <a href="http://playground.arduino.cc/Learning/ArduinoSleepCode" rel="nofollow noreferrer">Arduino sleep web</a></p>

<p>But can it be done with another pin?</p>
 -1: <p>Arduino Mini has only two interrupt capable pins: 2 and 3. You have to move your sensor to other pin.</p>

<p>From the AtMega328p datasheet:</p>

<blockquote>
  <p>If a level triggered interrupt is used for wake-up from Power-down,
  the required level must be held long enough for the MCU to complete
  the wake-up to trigger the level interrupt. If the level disappears
  before the end of the Start-up Time, the MCU will still wake up, but
  no interrupt will be generated. The start-up time is defined by the
  SUT and CKSEL Fuses.</p>
</blockquote>
 4143: <p>As well as the normal external interrupts INT0 and INT1 you can also wake the chip through a variety of other interrupts. One of those is the <em>pin change</em> interrupt.</p>

<p>In the datasheet is a table of what is available in the different sleep modes, and what can wake you from that sleep mode. I have compressed the table to remove a lot of the stuff you don't care about at the moment and just show the "wake-up sources":</p>

<p><a href="https://i.stack.imgur.com/1mSvq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1mSvq.png" alt="enter image description here"></a></p>

<p>As you can see both INT and PCINT can wake from all modes (along with TWI [Wire.h] slave mode address matching).</p>

<p>The note (3) on the table just says that for INT0 and INT1 it must be a LOW level interrupt, not a RISING or FALLING. No mention is made of the type of interrupt for PCINT.</p>

<p>So yes, since pin 7 has PCINT facilities (all pins on the ATMega328P have PCINT) you can configure that as a wake-up source and wake the MCU using pin 7.</p>
