wp100
Advanced Member level 6
- Joined
- May 15, 2009
- Messages
- 3,051
- Helped
- 884
- Reputation
- 1,783
- Reaction score
- 733
- Trophy points
- 113
- Location
- Prime Meridian
- Activity points
- 0
Hi,
I would not do it that way, too much like hard work.
In your ISR every time your timer1 interupts you update your seconds counter, e.g. secondsUnit and secondsTens, and if needed you carry over to your minutes and hours and days etc.
You have plenty of time in your ISR to do that.
Then in your main led routine its just a case of loading the appropriate register and convtering it to 7 seg format, much quicker that testing as you are doing now.
I would not do it that way, too much like hard work.
In your ISR every time your timer1 interupts you update your seconds counter, e.g. secondsUnit and secondsTens, and if needed you carry over to your minutes and hours and days etc.
You have plenty of time in your ISR to do that.
Then in your main led routine its just a case of loading the appropriate register and convtering it to 7 seg format, much quicker that testing as you are doing now.