Rev 466 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 466 | Rev 479 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #include "main.h" |
1 | #include "main.h" |
Line 2... | Line 2... | ||
2 | 2 | ||
3 | volatile unsigned int CountMilliseconds = 0; |
- | |
4 | volatile static unsigned int tim_main; |
3 | volatile unsigned int CountMilliseconds = 0; |
5 | volatile unsigned char UpdateMotor = 0; |
4 | volatile unsigned char UpdateMotor = 0; |
6 | volatile unsigned int beeptime = 0; |
5 | volatile unsigned int beeptime = 0; |
7 | unsigned int BeepMuster = 0xffff; |
6 | unsigned int BeepMuster = 0xffff; |
Line 65... | Line 64... | ||
65 | } |
64 | } |
Line 66... | Line 65... | ||
66 | 65 | ||
67 | 66 | ||
68 | void Timer_Init(void) |
- | |
69 | { |
67 | void Timer_Init(void) |
70 | tim_main = SetDelay(10); |
68 | { |
71 | TCCR0B = CK8; |
69 | TCCR0B = CK8; |
72 | TCCR0A = (1<<COM0A1)|(1<<COM0B1)|3;//fast PWM |
70 | TCCR0A = (1<<COM0A1)|(1<<COM0B1)|3;//fast PWM |
73 | OCR0A = 0; |
71 | OCR0A = 0; |