user43583: I'm using an Attiny84 with the Tiny Core. 
I'm try to use port manipulation to write the lower four bits of port A. I'm using i2c which occupies bits 5 and 7.
How can I write only to the lower 4 bits to avoid interfering with the i2c?

user10794: I don't think you need to worry. A simple piece of code:
void setup() 
{
 PORTA |= bit (0);
}

void loop() { }

Generates:
00000044 <setup>:
  44:   d8 9a           sbi 0x1b, 0 ; 27
  46:   08 95           ret

In other words, the compiler generates code to set that bit, ignoring all the other bits.

43583: <p>I'm using an Attiny84 with the Tiny Core. 
I'm try to use port manipulation to write the lower four bits of port A. I'm using i2c which occupies bits 5 and 7.</p>

<p>How can I write only to the lower 4 bits to avoid interfering with the i2c?</p>
 10794: <p>I don't think you need to worry. A simple piece of code:</p>

<pre class="lang-c++ prettyprint-override"><code>void setup() 
{
 PORTA |= bit (0);
}

void loop() { }
</code></pre>

<p>Generates:</p>

<pre class="lang-none prettyprint-override"><code>00000044 &lt;setup&gt;:
  44:   d8 9a           sbi 0x1b, 0 ; 27
  46:   08 95           ret
</code></pre>

<p>In other words, the compiler generates code to set that bit, ignoring all the other bits.</p>
