Hi all!
I've just started to learn C for avr microcontrollers, but i urgently need to write a code for a project of mine to finish it (it is not school related).
Basically what i need is to convert a square wave signal to a constant one. I have an IC that controls 7 bands of leds, so every band is on 1/7th of the time, so i want to put a microcontroller between that IC and the output transistors in order to "smooth" the signal, because of that low duty cycle signal the brightness of the leds is too low.
I'm planning to use ATtiny2313 because it has enough pins for the job. So i need to write a code for the ATtiny so when a square wave signal is detected at pin number 2 a constant output signal is presented at pin number 19 for example.
Here is a rough schematic of what i have in mind:

If you can give me example for 1 pin on how the code will work i will do the rest for the 7 pins. Or if there is a tutorial or a similar project somewhere i think i will figure it out. I just wasn't able to find what i need on the net.
Thanks!
I've just started to learn C for avr microcontrollers, but i urgently need to write a code for a project of mine to finish it (it is not school related).
Basically what i need is to convert a square wave signal to a constant one. I have an IC that controls 7 bands of leds, so every band is on 1/7th of the time, so i want to put a microcontroller between that IC and the output transistors in order to "smooth" the signal, because of that low duty cycle signal the brightness of the leds is too low.
I'm planning to use ATtiny2313 because it has enough pins for the job. So i need to write a code for the ATtiny so when a square wave signal is detected at pin number 2 a constant output signal is presented at pin number 19 for example.
Here is a rough schematic of what i have in mind:

If you can give me example for 1 pin on how the code will work i will do the rest for the 7 pins. Or if there is a tutorial or a similar project somewhere i think i will figure it out. I just wasn't able to find what i need on the net.
Thanks!