??? 12/09/05 07:11 Read: times |
#104949 - Amenic Temp Controller, |
![]() ![]() Hi all My new project is A Skin Temperature Controller For Baby Please let me,i describe whole of project There are 2 modes of operation, Skin(Auto) And Manual (pink and yellow leds) There are 3 7-segments which adjusted by user for required temperature (it is usually 37 celsius degree) and 3 7-segments for showing current skin probe temperature(between 20 and 43 celsius degree) there are 6 visual alarms for 6 Error (Setpoint,Battery Fail,Power Fail,Over Heat,System And Probe Fail) also there is a periodic sonic alarm(Beep) for visual alarms There is a Bargraph for percentage of sent power to heater I use AD7715 (16 bit serial ADC) so there is no signal conditioning for Sensor, MOC3063 is an optotriac for zero cross detection of Mains After 1350 seconds visual setpoint alarm continued with beep If Mute key is pressed 135 seconds later beep is started again There are 5 Timing in my Software 1).Blinking Visual Alarms 2).Loaded time value for Heater Controlling 3).Generating Beep 4).Output Rate of my Adc is 500HZ(1/500= 2msec needed time for reading ADC) 5).Time intervals for repeating this loop I used 3 existed timers in MCU, Timer2 Interrupt For 135 seconds generation Timer1 Interrupt for heater controlling And Timer0 for Loop Time Intervals(Optional,It can be done in other interrupts) External Interrupt 0 for zero cross detection All things are OK,But there is a bit problem in my timing, when reading adc i disabled interrupts, This task destroys interrupts like zero cross detection on p3.2 And 135 seconds generating, when reading adc If i don't disable interrupts ,The returned value is damaged? If i use reading ADC in interrupts routine then generating 135 seconds is damaged! In your Mind what is the best method for solving this problem Thanks Mehdi |