NewSoftwareSerial replace SoftwareSerial for AtTiny85
Great!! it worket at 4800 and 9600 for attiny85!!
just download
NewSoftSerial10c from
http://arduiniana.org/libraries/newsoftserial/add as before:
#elif defined(__AVR_ATtiny84__) //mymodif here
#define digitalPinToPCICR(p) (((p) >= 0 && (p) <= 10) ? (&GIMSK) : ((uint8_t *)NULL))
#define digitalPinToPCICRbit(p) (((p) <= 2) ? 5 : 4)
#define digitalPinToPCMSK(p) (((p) <= 2) ? (&PCMSK1) : (((p) <= 10) ? (&PCMSK0) : ((uint8_t *)NULL)))
#define digitalPinToPCMSKbit(p) (((p) <= 2) ? (p) : (((p) - 10) * -1))
#elif defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || (__AVR_ATtiny85__) //mymodif here
#define digitalPinToPCICR(p) (((p) >= 0 && (p) <= 5) ? (&GIMSK) : ((uint8_t *)NULL))
#define digitalPinToPCICRbit(p) 5
#define digitalPinToPCMSK(p) (((p) >= 0 && (p) <= 5) ? (&PCMSK) : ((uint8_t *)NULL))
#define digitalPinToPCMSKbit(p) (p)
and add
void NewSoftSerial::enable_timer0(bool enable)
{
if (enable)
#if defined(__AVR_ATmega8__) || (__AVR_ATtiny85__) //mymodif here
sbi(TIMSK, TOIE0);
#else
sbi(TIMSK0, TOIE0);
#endif
else
#if defined(__AVR_ATmega8__) || (__AVR_ATtiny85__) //mymodif here
cbi(TIMSK, TOIE0);
#else
cbi(TIMSK0, TOIE0);
#endif
}
best regards, pescadito!