Made some updates to the Panasonic IR receiver module to include an PWM output to control an outdoor 12V LED lamp. The PWM duty cycle is controlled by the Panasonic remote left-arrow and right-arrow buttons. Original design at: https://larsenhenneberg.dk/2016/07/11/panasonic-tv-ir-decoder/
The PWM signal is provided via hardware registers, i.e. software is only needed for initialization and for subsequent changes in frequency and/or duty cycle.
In this way, the critical IR frame receiver timing is not affected by other interrupts. A software state-event machine is now in the main function to decode specific Panasonic remote IR button sequences.
The LED lamp output pin was moved from PB3 to PB4 (OC1B) to use the PWM signal:
Shown below are the scope snapshots of min. and max. PWM duty cycles at the LIGHT output.
The Attiny25 datasheet is available here: http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7598_Automotive-Microcontrollers-ATtiny25-45-85_Datasheet.pdf
The state-event diagram for the state event machine inside the gcc C main() function:
The updated Attiny25 C source is here: main_c