mchr3k / arduino-libs-manchester

172 stars 113 forks source link

Manchester library with ATtiny84 #35

Open pataelav opened 7 years ago

pataelav commented 7 years ago

Hello, I try to use the ATtiny84 with Manchester library as a receiver, and it did not work, I try to solve the problem. Finaly I succeed, I belive that there a small missing part in the library. In the ATtiny84 the timer is set by TCCR1B bits WGM13, WGM12, and this is handled in the library, but the 'Waveform Generation Modes' is with two more bits : WGM11, WGM10 in TCCR1A, these bits are not set in the library. I added this line to the Manchester.cpp : TCCR1A = 0; this set the WGM11, WGM10 to 00, and to 0100 for all 4 bits (WGM13, WGM12, WGM11, WGM10) , I use the ATtiny84A 8MHz refer to datasheet ATtiny84A table 12-5 Please check and maybe you will fix this for others to enjoy this library with the ATtiny84 as a receiver.

Avi

Atalonica commented 6 years ago

@pataelav. thank you for you work. This issue affects ATtiny44 at 8 MHz as well but by adding TCCR1A = 0 before TCCR1B definition as you suggested it finally worked too.