cancel
Showing results for 
Search instead for 
Did you mean: 

using timer

mailtoarup
Associate II
Posted on March 12, 2003 at 06:16

using timer

2 REPLIES 2
mailtoarup
Associate II
Posted on March 10, 2003 at 06:08

hello.

i m new to micro-controller..........

i m woking on demo-kit(InDart),using ST72F264G2B6 -micro.....pinPB0...7 are connected to LEDs.

Now i have an idea to work like that........

I want to glow Led1 .After 50secs Led2.....likewise 8Leds should glow repeatedly with time gap of 50Secs ......

How can I do that using Time A...

pls help me soon..

thanks,

arup

itsmejatinus
Associate II
Posted on March 12, 2003 at 06:16

Hi,

You can use the timer interrupt to do the same. Depending up on your clock frequency, you can select the time for one interrupt letus say 100msec. For 50 seconds you will need 500 interrupts. You can have a variable into your software that can maintain this count. After each interrupt you can increment this variable & check it whether it is equal to 500 or not . IF it becomes equal then you can glow the corresponding LEd & reset the counter. Again the same process will follow.

I hope this would help you.