Rev 528 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 528 | Rev 529 | ||
---|---|---|---|
Line 43... | Line 43... | ||
43 | cnt = 9; |
43 | cnt = 9; |
44 | cnt_1ms++; |
44 | cnt_1ms++; |
45 | cnt_1ms %= 2; |
45 | cnt_1ms %= 2; |
46 | if(!cnt_1ms) UpdateMotor = 1; |
46 | if(!cnt_1ms) UpdateMotor = 1; |
47 | CountMilliseconds++; |
47 | CountMilliseconds++; |
48 | if(Timeout) Timeout--; |
- | |
49 | } |
48 | } |
Line 50... | Line 49... | ||
50 | 49 | ||
51 | if(beeptime > 1) |
50 | if(beeptime > 1) |
52 | { |
51 | { |
Line 117... | Line 116... | ||
117 | tim_main = SetDelay(10); |
116 | tim_main = SetDelay(10); |
118 | TCCR0B = CK8; |
117 | TCCR0B = CK8; |
119 | TCCR0A = (1<<COM0A1)|(1<<COM0B1)|3;//fast PWM |
118 | TCCR0A = (1<<COM0A1)|(1<<COM0B1)|3;//fast PWM |
120 | OCR0A = 0; |
119 | OCR0A = 0; |
121 | OCR0B = 120; |
120 | OCR0B = 120; |
122 | TCNT0 = -TIMER_RELOAD_VALUE; // reload |
121 | TCNT0 = (unsigned char)-TIMER_RELOAD_VALUE; // reload |
123 | //OCR1 = 0x00; |
122 | //OCR1 = 0x00; |
Line 124... | Line 123... | ||
124 | 123 | ||
125 | TCCR2A=(1<<COM2A1)|(1<<COM2A0)|3; |
124 | TCCR2A=(1<<COM2A1)|(1<<COM2A0)|3; |
Line 157... | Line 156... | ||
157 | unsigned int akt; |
156 | unsigned int akt; |
158 | akt = SetDelay(w); |
157 | akt = SetDelay(w); |
159 | while (!CheckDelay(akt)); |
158 | while (!CheckDelay(akt)); |
160 | } |
159 | } |
Line -... | Line 160... | ||
- | 160 | ||
- | 161 | void Delay_ms_Mess(unsigned int w) |
|
- | 162 | { |
|
- | 163 | unsigned int akt; |
|
- | 164 | akt = SetDelay(w); |
|
- | 165 | while (!CheckDelay(akt)) ANALOG_ON; |
|
- | 166 | } |
|
161 | 167 | ||
162 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
168 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
163 | // Servo ansteuern |
169 | // Servo ansteuern |
164 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
170 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
165 | SIGNAL(SIG_OUTPUT_COMPARE2A) |
171 | SIGNAL(SIG_OUTPUT_COMPARE2A) |