Using an ATtiny85 as SPI Slave

Hi,

thank you for the reply.It seems like the task is more complex than I initially thought. I personally wont be able to port the above linked Code to C. I wonder why nobody else has written an SPI Slave Code for the Attiny using the Arduino IDE. I found the I²C Code for the ATtiny here:
Arduino Playground - USIi2c .
However, this I²C port does not use interrupts and the main loop of the code is stuffed with I²C Communication code. As Im exploiting frequency measuremnents here (which might be scallable in the near future) I find that rather unelegant. The above given SPI Slave example does use interrupts and the main loop is used heavily for the frequency measurement.

The ATtiny85 I will be using is just supposed to constantly measure the frequency of one flowmeter. When polled for it the ATtiny85 should transfer the measured frequency via SPI to the master. I guess a low bitrate will be sufficient for my case. Thus 9600 baud should do the job.

Best regards,
Jan