Hi, I'm in the R&D stage of a project and am about to buy some hardware to mess with...
Is it possible for an 8DIP ATTiny85 to output a 25kHz (21-27kHz acceptable) PWM signal, input and calculate tachometer RPM and finally talk to an Arduino Uno Or Raspberry Pi via SPI,I2C,Serial or some other protocol?
Is the ATTiny85 upto this? Is there something of similar size that would work better?
Thanks for the help guys!
Yup. The only caveat is that you'd be using Timer1 to generate the PWM (since timer0 is used for millis). But the Timer1 on the Tiny85 is not the same as the Timer1 on most of the AVR product line (it's an 8-bit high speed timer that can be clocked off the PLL and has more prescaler options, instead of the usual 16-bit timer) - it's not any more complicated to use, it's just that it's not quite the same, so there's less code available online to steal. On the plus side, it's a wonderful timer!
I2C or SPI works - with SPI you'd be running short on pins. There's no hardware serial - you can get serial, but it's a software implementation - so it's half-duplex, and send/receive are blocking.