Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #undef ALLTIME_5V
- #ifdef ALLTIME_5V
- #else
- if ((T >= MIN_TEMP) & (T <= MAX_TEMP))
- {
- if (FanStoped)
- {
- PWM_ = Max;
- FanStoped = 0;
- goto e1;
- }
- #endif
- dP = Max - Min;
- if (T < MIN_TEMP)
- {
- T = MIN_TEMP;
- }
- T = T - MIN_TEMP;
- PWM_ = ((dP / DT) * T);
- PWM_ = PWM_ + Min;
- goto e1;
- }
- #ifndef ALLTIME_5V
- if (T < MIN_TEMP)
- {
- PWM_ = 0;
- FanStoped = 1;
- }
- #endif
- if (T > MAX_TEMP)
- {
- PWM_ = 255;
- FanStoped = 0;
- Beep();
- }
- e1:
- OCR0A=PWM_;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement