We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

G
Join the discussion…


  • in this conversation
Log in with

  • Hello.
    Can you help me?
    1. What should I do to make this program work on Arduino UNO (I have a similar display and the HW-477 IR receiver module)?
    2. After pasting into IDE, problems occurred because TIMSK, TIFR, TCCR1, PCMSK, GIMSK, PCIE were not declared.
    3. Where is the IR receiver pin defined?

    • Avatar

      Hello. Need help.
      1. how to flash Attiny85 fuses, I can’t find Timer 1 Clock: CPU in Arduino 1.8.19. Also, I have an Oled display 4 pin w/o Rst.. how to solve the problem.... maybe you can give me a hex file and fuses. Thanks!

      • Great, thank you! It took only one weekend for me to build this sophisticated IR-decoder. The code can also compile in PlatformIO. Here are my steps (german sites):
        * Base platformio.ini for ATTiny:
        https://www.heise.de/ct/art...
        * Installation of IDE:
        https://www.heise.de/ct/art...
        * set the library path in platformIO to your Arduino Library Path (don't remember, where)
        * add to the code:
        #include <arduino.h> // "undefined reference to setup and loop"
        #include <stdlib.h> // "abs()"
        #include <avr pgmspace.h=""> //"PROGMEM"
        #include <avr interrupt.h=""> //"ISR"

        • I have a chinese display without the reset pin, the program works perfect but there are a lot of random pixels on the OLED because of no reset pin. Is there a way to solve this in code?

          • Thank you for the great program. However it does not seem to decode Sony 20-bit correctly. For example, when decoding a Sony BD player the command decodes correctly, but the 1st byte of the Address and Protocol are wrong. PWR returns somewhat random Protocols ('S%0', 'S', 'h', '}'). The Address is 7C5A. The Play button has the same random protocols and the Address is BC5A.
            It seems to be consistent on the last three bytes of the address but the first address byte and Protocol are different depending on the command.

              • Avatar

                Sorry about that - I had only one Sony remote to test it with. As a test you could try editing the section of code after the comment "// End of intro pulse" to force it to identify the protocol as 'S', and see if it then decodes the command and address correctly. I'll have a look at it, but let me know if you solve it in the meantime.

                  • Thanks. I forced S protocol but no change. It seems the 1st byte of the Device Address and the Protocol Character (IRtype) are still intertwined. The only constant is bytes 2-4 of address (C5A) and the command is correct.
                    It is acting like it is not finding the end correctly (20 bits) and seems to fluctuate based on how long I press the button (quick press, normal press).
                    BTW, for this remote it has a 5-bit device code of 26 and 8-bit extended device code of 226 so combining those into 13 bits gives 1AE2. However if you swap their order (extended code + device code) you get 1C5A which is close to what the program is returning. Your code seems very efficient but that complexity is over my head with all the bitwise operations so no chance of me solving it :)

                • Avatar

                  There's an article on the Arduino site for programming the Tiny AVR fellows via their boards. And of course via Hack A Day someplace. But the programmer from the folks at Sparkfun will definitely do the job and a half.

                  • NR

                    6V does not damage AVRs. Look at the max Vcc in the datasheet.
                    I do prefer 3-3.3v for battery power, using a coin or LiFePO4 cell.

                      • M

                        Page 160 of the Atmel Attiny25/45/85 datasheet lists the absolute maximum ratings of its electrical characteristics and lists Vcc at 6.0V, yes. But it means that 6.05V can already damage your AVR. That's why they list it with 5.5V max in the overview on page 1. And you shouldn't forget that this is not the only part in that circuit that needs to handle that voltage. The display looks as if it is working with 3.3V and has an onboard voltage regulator to burn off the rest so it should be also fine with 6V. But the TSOP needs to handle that, too. I'm too lazy to google for its datasheet for the correct max ratings but I think I remember that it can handle up to something like 13V, so we are probably fine here, too. But always check all datasheets for safety. And: Full alkaline AAs can deliver 1.6V, I have even seen some with 1.65V. So four of them punch with something between 6V and 6.6V max when they are really fresh. So much for absolute maximum rating... :)

                      • M

                        Why are you running this with 5V? The ATtiny and the TSOP work also with 3.3V and that way you don't have to use the onboard voltage regulator on the display but can drive it directly using it's 3.3V input? I mean yes, on a breadboard, 5V is a common value. It comes directly from the USB port. But when I try to build this, it is not so simple to find a 5V power source. So I usually plan my projects for 3.3V and use a Lithium coin cell to power it.

                          • Avatar

                            Good point, thanks. I'll relabel the schematic.

                              • M

                                I never got why 5V is a standard value anyway. It's so hard to provide without stepup or voltage regulation circuits. The closest I get it is with 4 rechargeable AA(A) Batteries and even those are "only" 4.8V. And when someone accidentially puts 4 regular batteries in the tray, you end up with 6V which can fry your stuff (I think I remember ATtiny like 5.5V max). So I always have to decide if I put in a stepup module which will put a harder drain on the battery or if I put in a voltage regulator which wastes energy (cheap) or generates interferences (more expensive) that I have to iron out with a capacitor just to get 5V. :)