mchr3k / arduino-libs-manchester

173 stars 113 forks source link

RX does not work with ATTiny85 #2

Closed joshuajnoble closed 11 years ago

joshuajnoble commented 11 years ago

The ATTiny85 code consistently fails to read Manchester encoded input from a 433Mhz RF receiver. I've modified the intiialization so that it compiles:

  TIMSK |= _BV(OCIE1A); // Turn on interrupt

rather than

  TIMSK1 |= _BV(OCIE1A); // Turn on interrupt

however, the ISR method never exits RX_MODE_SYNC, as the following block on Manchester.cpp line 284, is always executed:

        if(((rx_sync_count < 20) || (rx_last_sample == 1)) && 
           ((rx_count < MinCount) || (rx_count > MaxCount)))
        {
          // First 20 bits and all 1 bits are expected to be regular
          // Transition was too slow/fast
          rx_mode = RX_MODE_PRE;
        }
bredita commented 11 years ago

It works quite well for me with the later versions of the library. I am using an attiny85 as a receiver. It receives messages - I use it as a "monitor" to see what my nodes are transmitting. Maybe this issue can be closed?

joshuajnoble commented 11 years ago

It should definitely be closed, there was a pull request here: https://github.com/mchr3k/arduino-libs-manchester/pull/4

that fixed it all. Thanks to all that participated and especially to mchr3k!

On Fri, May 10, 2013 at 9:24 PM, bredita notifications@github.com wrote:

It works quite well for me with the later versions of the library. I am using an attiny85 as a receiver. It receives messages - I use it as a "monitor" to see what my nodes are transmitting. Maybe this issue can be closed?

— Reply to this email directly or view it on GitHubhttps://github.com/mchr3k/arduino-libs-manchester/issues/2#issuecomment-17719784 .

joshua noble http://thefactoryfactory.com

mchr3k commented 11 years ago

Good point - I'll close.