Communication between ATtiny85 and ATMEGA328

My plan is to have the ATtiny85 run some functions that other wise slow down the process of the ATMEGA328. I need to send information back to the ATMEGA328 chip to print it on an LCD screen. I have looked for sources on how to accomplish sending data from one chip to another but have came up empty. I have found plenty of sources describing how to have two chip and serially connect them to a PC but that is not what I need. Can someone direct me to a source that can help me with this?

Thanks

(deleted)

spycatcher2k:
have a look at the data sheet - it has a I2c (TWI) interface - use that with the wire library. :wink:

Thanks for the help. This is what I have came up with for the transmitter but it give me many errors when before without the wire library the code compiled fine. Can you look at it and see what I have missed?

#include <Wire.h>

void setup()
  {
    Wire.begin();
    Serial.begin(9600);
    int CVin = A1; 
    int CV = 0; 
    int CVout = 0; 
  }
void loop()
  {
    cvRead();
    dataTransport();
  }
void cvRead() 
  {
    CV = analogRead(CVin);   // read the voltage level at analog pin 1 
    CVout = map(CV, 0, 1023, 0, 127); // map the reading to a value of 0-127 
  }
void dataTransport()
  {
    Wire.beginTransmision(4);
    Wire.send(CVout);
    Wire.endTransmission();
  }

Here is the errors it gives me.

Test_Code_001.ino: In function 'void cvRead()':
Test_Code_001:18: error: 'CV' was not declared in this scope
Test_Code_001:18: error: 'CVin' was not declared in this scope
Test_Code_001:19: error: 'CVout' was not declared in this scope
Test_Code_001.ino: In function 'void dataTransport()':
Test_Code_001:23: error: 'class TwoWire' has no member named 'beginTransmision'
Test_Code_001:24: error: 'class TwoWire' has no member named 'send'

As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.

Test_Code_001:24: error: 'CVout' was not declared in this scope

I figured out a few of the problems. This is my new code.

#include <Wire.h>

void setup()
  {
    Wire.begin();
    Serial.begin(9600);
    int CVin = A1; 
    int CV = 0; 
    int CVout = 0; 
  }
void loop()
  {
    cvRead();
    dataTransport();
  }
void cvRead() 
  {
    CV = analogRead(CVin);   // read the voltage level at analog pin 1 
    CVout = map(CV, 0, 1023, 0, 127); // map the reading to a value of 0-127 
  }
void dataTransport()
  {
    Wire.beginTransmission(4);
    Wire.write(CVout);
    Wire.endTransmission();
  }

Along with the error messages.

Test_Code_001.ino: In function 'void cvRead()':
Test_Code_001:18: error: 'CV' was not declared in this scope
Test_Code_001:18: error: 'CVin' was not declared in this scope
Test_Code_001:19: error: 'CVout' was not declared in this scope
Test_Code_001.ino: In function 'void dataTransport()':
Test_Code_001:24: error: 'CVout' was not declared in this scope

I don't understand why I am getting these errors. I defined these all as int in the setup.

(deleted)

(deleted)