
So, make is as simple and stupid as possible and concentrate on the pseudo random number generator. This event is known as roll-over event or overflow event.

At the arrival of the next pulse, the TC1 rolls-over from all 1s to all 0s.
#ASSEMBLY TIMER COUNTER 1 ATMEGA FULL#
In all cases, the algorithm that you will use to generate the pseudo random numbers is much more important than the seed generation approach. In this mode, the TC1 works as an up-counter it begins counting from all 0s (0000h) and reaches at the full count of all 1s (FFFFh). This way, the human provided switch ON will provide random moment event. This way you will get better randomization, because the RTC runs even if the whole devide is switched off. If your device supports real time clock, use it.
#ASSEMBLY TIMER COUNTER 1 ATMEGA SOFTWARE#
This way, you can use for example some of the timers, configured to the fastest possible frequency, or even a simple software counter incremented on every main program loop (of course if the program is fast enough). The output compare pin is OC3A, and is multiplexed to C6, while the input capture pin is IPC3, which is multiplexed to C7. Timer 3 is a 16-bit free-running timer with one output compare unit, and a single input capture unit. Several kilohertz is a acceptable frequency. MEAM.Design - ATmega32 Programming - Timers/Counters - Timer 3 Configuration Details. Automatic Street Light Controller Using Avr Atmega16 June 11th. LDR adc interfacing with atmega16 YouTube. The only requirement to it is to run much more faster then the human reaction time. Vehicle Movement Street Light With Light Sensing Atmega. The Atmega controllers provide hardware counters. The counter is not actually so important. ATmega8 have 3 different timers, of which the simplest one is TIMER0, with an 8 bit (0-255) resolution. In the computers, the human randomizes the moment of the program start. Without human interaction, it is not possible to get random number seed using timer or counter.

In order to do it, you need a timer/counter that counts fast and continuously and human that actually performs as a random event generator. You can use it only as a source for the pseudo random algorithm seed number.

I see, you know it, but to emphasize once again, you can't use any timer/counter value as random number generator. The 16-bit Timer/Counter unit allows accurate program execution timing (event management), wave generation, and signal timing measurement. Timer/Counter A operating modes, including using the Event input.
