user11885: I have no UARTs left on the ATmega and need to deliver 1 Byte of information from the pi using 1 analog input. I2C is no option either.
I planned using the digital output to request an analog signal from the Pi, but it does not seem to have a DAC.
Is it possible to properly translate/read a PWM signal with the atmegas ADC?
Analyzing the PWM the 'usual' way would probably be too slow as I don't trust the pi to keep up with a high PWM frequency.
PINS left: PA0(ADC0|PCINT0), PD7(OC2A|PCINT31)
I should add that this is a rather large robotics project involving communication between 8 MCUs in it's current state and needs to be extended by a computer vision module(=pi), which is not compatible with the existing custom bus
Edit: This also is a real time system which has approximately ~1-2ms left in it's main loop(10ms period). The required data has to be present in time as it alters the robot's behaviour for this loop.

user20245: You can start researching about one wire protocol here to see if can implement it given your situation.

user11885: The solution was to hook up PA0 to GPIO18 of the pi with an RC-circuit inbetween.
GPIO18 features a hardware PWM output, which has to be set to mode 0 (non balanced, mark-space), because the balanced mode could not handle odd pwmRanges for some reason(it is badly documented).
This setup enables the atmega to read the pi's pulsed 0-3,3V output as analog input.
Pin initialization on Pi(using a python library):
import wiringpi2 as wiringpi

wiringpi.wiringPiSetupGpio()
wiringpi.pinMode(18, 2)
wiringpi.pwmSetMode(0)    #<- important part

Currently writing the Atmega side
    uint8_t     i = 0;
    uint32_t val  = 0;
    while(i<8)    //average 8 measures
    {
        i++;
        ADMUX   = 0 & 0x1f;    //select channel 0 (PA0)
        ADMUX |= (1<<5);       //set ADLAR bit ADCH > ADCL
        ADCSRA  = ADCSRA | (1 << ADSC) | (1 << ADIF);
        while (ADCSRA & (1<<ADSC));
        val = val + (ADCH);
    }
    return ((val)>>3);

Note that this reads a 10bit value on the channel and discards the least significant 2bit stored in ADCL as ADLAR is set to speed everything up.

11885: <p>I have no UARTs left on the ATmega and need to deliver 1 Byte of information from the pi using 1 analog input. I2C is no option either.</p>

<p>I planned using the digital output to request an analog signal from the Pi, but it does not seem to have a DAC.</p>

<p>Is it possible to properly translate/read a PWM signal with the atmegas ADC?
Analyzing the PWM the 'usual' way would probably be too slow as I don't trust the pi to keep up with a high PWM frequency.</p>

<p>PINS left: PA0(ADC0|PCINT0), PD7(OC2A|PCINT31)</p>

<p>I should add that this is a rather large robotics project involving communication between 8 MCUs in it's current state and needs to be extended by a computer vision module(=pi), which is not compatible with the existing custom bus</p>

<p>Edit: This also is a real time system which has approximately ~1-2ms left in it's main loop(10ms period). The required data has to be present in time as it alters the robot's behaviour for this loop.</p>
 20245: <p>You can start researching about one wire protocol <a href="https://en.wikipedia.org/wiki/1-Wire" rel="nofollow">here</a> to see if can implement it given your situation.</p>
 11885: <p>The solution was to hook up PA0 to GPIO18 of the pi with an RC-circuit inbetween.
GPIO18 features a hardware PWM output, which has to be set to mode 0 (non balanced, mark-space), because the balanced mode could not handle odd pwmRanges for some reason(it is badly documented).</p>

<p>This setup enables the atmega to read the pi's pulsed 0-3,3V output as analog input.</p>

<p>Pin initialization on Pi(using a python library):</p>

<pre><code>import wiringpi2 as wiringpi

wiringpi.wiringPiSetupGpio()
wiringpi.pinMode(18, 2)
wiringpi.pwmSetMode(0)    #&lt;- important part
</code></pre>

<p>Currently writing the Atmega side</p>

<pre><code>    uint8_t     i = 0;
    uint32_t val  = 0;
    while(i&lt;8)    //average 8 measures
    {
        i++;
        ADMUX   = 0 &amp; 0x1f;    //select channel 0 (PA0)
        ADMUX |= (1&lt;&lt;5);       //set ADLAR bit ADCH &gt; ADCL
        ADCSRA  = ADCSRA | (1 &lt;&lt; ADSC) | (1 &lt;&lt; ADIF);
        while (ADCSRA &amp; (1&lt;&lt;ADSC));
        val = val + (ADCH);
    }
    return ((val)&gt;&gt;3);
</code></pre>

<p>Note that this reads a 10bit value on the channel and discards the least significant 2bit stored in ADCL as ADLAR is set to speed everything up.</p>
