HOW TO SET TIME ON AVR Atmega32 BY TAKING INPUT VALUE ..?

Thread Starter

AVINASH_08

Joined Jan 14, 2016
31
Hello ,
i am working on simple project ,in project few components are there like
Atmega32,
led ,
buzzer,4 push button (2 for set time up,down with +15 or-15 min time slot) (2 for set intensity up down in range 0-5)
by these 4 push button i am generating 2 values in different variable.
After setting this both time and intensity value i had save these in 2 different integer x,y( x for time)(y for intensity)
so the problem is i want to glow Led depends on value of x & y

and at last stage before time goes out for 5 sec want to on buzzer ,
and how we no that last 5 second are remaining so we want to on buzzer ??
what kind of logic need to apply for this condition??
 

Thread Starter

AVINASH_08

Joined Jan 14, 2016
31
Just thinking aloud.............

Can you break the time variable into 2 parts, one that contains total time less 5 seconds & one that contains just 5 seconds, count\monitor the first value, when that expires turn the buzzer on the count the second value down.

Tho you would have to allow for a condition where the time set is less than 5 seconds, if the time can be set less than 5 seconds. I guess you're using PWM for intensity ?
yes i am using PWM for intensity ..but the problem with only timer ...i think i want to set timer according to counter..then count that pulse up x value , and at last 5 sec buzzer will on.....is it like this??
 
Top