// REGISTER ADDRESSES TO BE USED IN MODBUS SERIAL COMMUNICATION enum { // MODBUS REGISTER // MIN MAX DESCRIPTION // Address 0 MODBUS_SERIALNUMBER_LOWORD , // - - Lower 2 bytes of the serial number MODBUS_SERIALNUMBER_HIWORD = 2 , // - - Upper 2 bytes of teh serial number MODBUS_VERSION_NUMBER_LO = 4 , // - - Software version MODBUS_VERSION_NUMBER_HI, // - - Software version MODBUS_ADDRESS, // 1 254 Device modbus address MODBUS_PRODUCT_MODEL, // - - Temco Product Model 1=Tstat5B, 2=Tstat5A, 4=Tstat5C, 12=Tstat5D, MODBUS_HARDWARE_REV, // - - Hardware Revision MODBUS_PIC_VERSION, // - - PIC firmware version MODBUS_ADDRESS_PLUG_N_PLAY, // - - Temporary address for plug-n-play addressing scheme // registers needed for updating status MODBUS_UPDATE_STATUS = 16, // reg 16 status for update_flash // writing 0x7F means jump to ISP routine // writing 0x8F means completely erase eeprom MODBUS_UPDATE_PTR_HI, // reg 17 pointer for last attempt upload HI MODBUS_UPDATE_PTR_LO, // reg 18 pointer for last attempt upload LO MODBUS_SCRATCHPAD_ADDRESS , // - - Internal scratch pad address //--------------------------------------------------------- // // BLANK AREA RESERVED FOR FUTURE USE // //--------------------------------------------------------- // Address 101 MODBUS_TEMPRATURE_CHIP = 101 , // - - Calibrated temperature chip reading (0.1 degrees) MODBUS_COOLING_VALVE, // - - Cooling valve position 0-1000 = 0-10V MODBUS_HEATING_VALVE, // - - Heating valve position 0-1000 = 0-10V MODBUS_COOLING_PID, // - - Cooling PI Term 0-100 - PID IN REV25 MODBUS_HEATING_PID, // - - Heating PI Term 0-1000 - NOT USED IN REV25 MODBUS_COOL_HEAT_MODE, // - - Heating or cooling mode in effect 0 = coasting, 1 = cooling, 2 = heating MODBUS_MODE_OPERATION, // - - Current state of Tstat. High heat -> coasting -> high cool. // 0 = Coasting, 1 = Cooling1, 2 = Cooling2, 3 = Cooling3, 4 = Heating1, 5 = Heating2, 6 = Heating3 MODBUS_DIGITAL_OUTPUT_STATUS, // - - Relays 1,2,3 and, if on-off type, 4 and 5 MODBUS_CALIBRATION , // 0 255 Thermistor calibration term // 0 = Temperature - 12.5 degrees, 125 = Temperature + 0 degrees, 255 = Temperature + 13 degrees // Address 110 MODBUS_CALIBRATION_ANALOG_IN1 , // 0 255 External thermistor calibration term // 0 = Temperature - 12.5 degrees, 125 = Temperature + 0 degrees, 255 = Temperature + 13 degrees MODBUS_TEMP_SELECT , // 0 1 Temperature select, 0=internal, 1=external MODBUS_DAC_OFFSET , // 0 255 DAC voltage offset MODBUS_DELAY , // 0 120 Short cycle prevention delay (0.1 seconds) - NOT USED IN REV25 MODBUS_COOLING_PTERM , // 0 255 Cooling P term (0.1 degree) MODBUS_COOLING_ITERM , // 0 255 Cooling I term (0.1 %deg/min) MODBUS_HEATING_PTERM , // 0 255 Heating P term (0.1 degree) - NOT USED IN REV25 MODBUS_HEATING_ITERM , // 0 50 Heating I term (1 %deg/min) - NOT USED IN REV25 MODBUS_SEQUENCE , // 0 2 Sequence of operation , tstat behaves differently according to sequence MODBUS_COOLING_DEADBAND , // 1 100 Cooling deadband (0.1 degree) // Address 120 MODBUS_HEATING_DEADBAND , // 1 100 Heating deadband (0.1 degree) MODBUS_DEGC_OR_F , // 0 1 Temperature units 0 = DegC, 1 = DegF MODBUS_FAN_MODE , // 0 3 Number of fan speeds to show on the display 0 = 0 speeds, 3 = 3 speeds MODBUS_NIGHT_HEATING_DEADBAND , // 0 35 (0 and 95 for degrees F) Night heating setback (1 degree) MODBUS_NIGHT_COOLING_DEADBAND , // 0 99 (0 and 95 for degrees F) Night cooling setback (1 degree) MODBUS_APPLICATION , // 0 1 0=Office, 1=Hotel or Residential MODBUS_POWERUP_SETPOINT , // 15 50 (59 and 99 for degrees F) Power up cooling setpoint (1 degree) MODBUS_POWERUP_MODE , // 0 3 Powerup mode. 0=Off, 2=On, 2=Last Value, 3=Auto MODBUS_KEYPAD_SELECT , // 0 3 Number of buttons on the keypad - 0=2, 1=4, 2=6A, 3=6B MODBUS_AUTO_ONLY , // 0 2 Enable or disable manual modes. 0=manual allowed, 1=auto only // Address 130 MODBUS_OUTPUT_SCALE , // 0 7 Sets the full scale voltage of the outputs - NOT USED IN REV25 // 0=ON/OFF, 1=0-10V, 2=0-5V, 3=2-10V, 4=OFF/ON, 5=10-0V, 6=5-0V, 7=10-2V MODBUS_MAX_SETPOINT, // 10 99 (50 and 150 for degrees F) Max cooling setpoint (1degree) MODBUS_MIN_SETPOINT, // 10 99 (50 and 150 for degrees F) Min heating setpoint (1degree) MODBUS_SPECIAL_MENU_LOCK, // 0 3 Special menu lockout via keypad, serial port only 0=unlock, 1=lock MODBUS_FACTORY_DEFAULTS, // 0 1 Factory defaults 0=no default MODBUS_COOLING_SETPOINT , // 15 50 (59 and 99 for degrees F) Cooling setpoint (1degree) MODBUS_HEATING_SETPOINT , // 10 35 (50 and 95 for degrees F) Heating setpoint (1degree) MODBUS_FAN_SPEED , // 0 4 Fan speed 0=OFF, 1=Low, 2=MED, 3=HI, 4=AUTO // Binary output state for each of the 8 modes of operation // Address 138 MODBUS_FAN0_OPER_TABLE_COAST, // MODBUS_FAN0_OPER_TABLE_COOL1, // MODBUS_FAN0_OPER_TABLE_COOL2, // MODBUS_FAN0_OPER_TABLE_COOL3, // MODBUS_FAN0_OPER_TABLE_HEAT1, // MODBUS_FAN0_OPER_TABLE_HEAT2, // MODBUS_FAN0_OPER_TABLE_HEAT3, // MODBUS_FAN1_OPER_TABLE_COAST, // Address 145 MODBUS_FAN1_OPER_TABLE_COOL1, // MODBUS_FAN1_OPER_TABLE_COOL2, // MODBUS_FAN1_OPER_TABLE_COOL3, // MODBUS_FAN1_OPER_TABLE_HEAT1, // MODBUS_FAN1_OPER_TABLE_HEAT2, // MODBUS_FAN1_OPER_TABLE_HEAT3, // MODBUS_FAN2_OPER_TABLE_COAST, // Address 152 MODBUS_FAN2_OPER_TABLE_COOL1, // MODBUS_FAN2_OPER_TABLE_COOL2, // MODBUS_FAN2_OPER_TABLE_COOL3, // MODBUS_FAN2_OPER_TABLE_HEAT1, // MODBUS_FAN2_OPER_TABLE_HEAT2, // MODBUS_FAN2_OPER_TABLE_HEAT3, // MODBUS_FAN3_OPER_TABLE_COAST, // Address 159 MODBUS_FAN3_OPER_TABLE_COOL1, // MODBUS_FAN3_OPER_TABLE_COOL2, // MODBUS_FAN3_OPER_TABLE_COOL3, // MODBUS_FAN3_OPER_TABLE_HEAT1, // MODBUS_FAN3_OPER_TABLE_HEAT2, // MODBUS_FAN3_OPER_TABLE_HEAT3, // MODBUS_FANAUT_OPER_TABLE_COAST, // Address 166 MODBUS_FANAUT_OPER_TABLE_COOL1, // MODBUS_FANAUT_OPER_TABLE_COOL2, // MODBUS_FANAUT_OPER_TABLE_COOL3, // MODBUS_FANAUT_OPER_TABLE_HEAT1, // MODBUS_FANAUT_OPER_TABLE_HEAT2, // MODBUS_FANAUT_OPER_TABLE_HEAT3, // // Analog output state for each of the 8 modes of operation MODBUS_VALVE_OPERATION_TABLE_BEGIN, // Address 173 MODBUS_VALVE_OPER_TABLE_COOL1, MODBUS_VALVE_OPER_TABLE_COOL2, MODBUS_VALVE_OPER_TABLE_COOL3, MODBUS_VALVE_OPER_TABLE_HEAT1, MODBUS_VALVE_OPER_TABLE_HEAT2, MODBUS_VALVE_OPER_TABLE_HEAT3, // Address 180 MODBUS_EXTERNAL_SENSOR_0, // - - External Sensor 0 reading MODBUS_EXTERNAL_SENSOR_1, // - - External Sensor 1 reading MODBUS_NIGHT_HEATING_SETPOINT, // 10 99 Night Heating Setpoint (1 degree) MODBUS_NIGHT_COOLING_SETPOINT, // 10 99 Night Cooling Setpoint (1 degree) MODBUS_INFO_BYTE, // - - Byte that holds info about the tstat // bit0 = occupancy bit - 1=occupied, 0=unoccupied // bit1 = watchdog reset - 1 indicates a reset due to watchdog // bit2 = serial write reset prevention MODBUS_BAUDRATE, // 0 1 Baudrate 0 = 9.6kb/s, 1 = 19.2kb/s MODBUS_OUTPUT1_SCALE, // 0 3 Sets the full scale voltage of analog output 1 // 0=ON/OFF, 1=0-10V, 2=0-5V, 3=2-10V, MODBUS_OUTPUT2_SCALE, // 0 3 Sets the full scale voltage of analog output 2 // 0=ON/OFF, 1=0-10V, 2=0-5V, 3=2-10V, MODBUS_ANALOG_IN1 , // 0 1 Analog input 1 range. MODBUS_ANALOG_IN2, // 0 0 Analog input 2 range. RESERVED FOR FUTURE USE // Address 190 MODBUS_DIGITAL_IN1, // 0 2 Digital occupied mode trigger // 0 = OFF, 1 = trigger unoccupied on falling edge, 2 = occupied high, unoccupied low // Address 191 MODBUS_OUTPUT1_DELAY_OFF_TO_ON, // 0 255 OFF to ON delay time (sec) MODBUS_OUTPUT2_DELAY_OFF_TO_ON, // 0 255 OFF to ON delay time (sec) MODBUS_OUTPUT3_DELAY_OFF_TO_ON, // 0 255 OFF to ON delay time (sec) MODBUS_OUTPUT4_DELAY_OFF_TO_ON, // 0 255 OFF to ON delay time (sec) MODBUS_OUTPUT5_DELAY_OFF_TO_ON, // 0 255 OFF to ON delay time (sec) // Address 196 MODBUS_OUTPUT1_DELAY_ON_TO_OFF, // 0 255 ON to OFF delay time (sec) MODBUS_OUTPUT2_DELAY_ON_TO_OFF, // 0 255 ON to OFF delay time (sec) MODBUS_OUTPUT3_DELAY_ON_TO_OFF, // 0 255 ON to OFF delay time (sec) MODBUS_OUTPUT4_DELAY_ON_TO_OFF, // 0 255 ON to OFF delay time (sec) MODBUS_OUTPUT5_DELAY_ON_TO_OFF, // 0 255 ON to OFF delay time (sec) // Address 201 MODBUS_CYCLING_DELAY , // 0 20 Delay between going out of heating or cooling and then back in. (1 min) MODBUS_CHANGOVER_DELAY, // 0 200 Delay between going from cooling to heating or vice versa (1 min) MODBUS_DISPLAY, // 0 6 Display setting. 0 = temperature, 1 = setpoint // Address 204 MODBUS_LED1_CONTROL, // 0 22 Determines what controls the state of the LED MODBUS_LED2_CONTROL, // 0 22 Determines what controls the state of the LED MODBUS_LED3_CONTROL, // 0 22 Determines what controls the state of the LED MODBUS_LED4_CONTROL, // 0 22 Determines what controls the state of the LED MODBUS_LED5_CONTROL, // 0 22 Determines what controls the state of the LED MODBUS_LED6_CONTROL, // 0 22 Determines what controls the state of the LED MODBUS_LED7_CONTROL, // 0 22 Determines what controls the state of the LED //CONTROL FUNCTION //VALUE //NONE //00 //RELAY1 //01 //RELAY2 //02 //RELAY3 //03 //RELAY4 //04 //RELAY5 //05 //COASTING STAGE //06 //COOLING1 STAGE //07 //COOLING2 STAGE //08 //COOLING3 STAGE //09 //HEATING1 STAGE //10 //HEATING2 STAGE //11 //HEATING3 STAGE //12 //COOLING MODE //13 //HEATING MODE //14 //FAN OFF //15 //FAN LOW //16 //FAN MED //17 //FAN HI //18 //FAN AUTO //19 //HEAT1_OR_COOL1 //20 //HEAT2_OR_COOL2 //21 //HEAT3_OR_COOL3 //22 //COOL1_2_OR_3 //23 //HEAT1_2_OR_3 //24 // Address 211 MODBUS_OVERRIDE_TIMER, // 0 255 Unoccupied Override Timer,Ort 0 = disabled,not 0=number of minutrs manual override is allowed MODBUS_OVERRIDE_TIMER_LEFT, // 0 255 number of minutes remaining on the timer when unoccupied override timer is in effect MODBUS_FILTER, // 0 100 weighted average of stored value to new raw value MODBUS_HEAT_COOL_CONFIG, // 0 5 heating cooling mode configuration MODBUS_INTERNAL_TEMP_IC, // 0 3000 the temperature value read from internal temperature sensor MODBUS_INTERNAL_THERMISTOR, // 0 3000 the temperature value read from internal thermistor sensor MODBUS_CALIBRATION_INTERNAL_THERMISTOR, // 0 1000 calibration value used on the internal sensor MODBUS_CALIBRATION_ANALOG_IN2, // 0 1000 calibration value used on the analoginput2 // Address 219 MODBUS_TABLE1_ZERO, // 0 65535 the range from reg 219 to reg 229.A changable look up table for "custom" sensor MODBUS_TABLE1_HALFONE, // the range of input voltage is 0----5v and the range is divided 10 equal partions,at 0.5v interval MODBUS_TABLE1_ONE, // the value's unit in the table is different according to different sensor MODBUS_TABLE1_HALFTWO, MODBUS_TABLE1_TWO, MODBUS_TABLE1_HALFTHREE, MODBUS_TABLE1_THREE, MODBUS_TABLE1_HALFFOUR, MODBUS_TABLE1_FOUR, MODBUS_TABLE1_HALFFIVE, MODBUS_TABLE1_FIVE, // Address 230 MODBUS_TABLE2_ZERO, // 0 65535 the range from reg 230 to reg 240.A changable look up table for "custom" sensor MODBUS_TABLE2_HALFONE, // the range of input voltage is 0----5v and the range is divided 10 equal partions,at 0.5v interval MODBUS_TABLE2_ONE, // the value's unit in the table is different according to different sensor MODBUS_TABLE2_HALFTWO, MODBUS_TABLE2_TWO, MODBUS_TABLE2_HALFTHREE, MODBUS_TABLE2_THREE, MODBUS_TABLE2_HALFFOUR, MODBUS_TABLE2_FOUR, MODBUS_TABLE2_HALFFIVE, MODBUS_TABLE2_FIVE , //Address 241 MODBUS_INPUT1_SELECT , // 0 2 universal PID input select MODBUS_UNIVERSAL_DB_HI , // 0 65535 universal PID upper deadband MODBUS_UNIVERSAL_DB_LO , // 0 65535 universal PID lower deadband MODBUS_UNIVERSAL_PTERM , // 0 65535 universal PID pterm MODBUS_UNIVERSAL_ITERM , // 0 65535 universal PID iterm MODBUS_UNIVERSAL_SET , // 0 65535 universal PID setpoint //Address 247 MODBUS_PID_OUTPUT1 , // 0 3 be used in the output table MODBUS_PID_OUTPUT2 , // decide which pid be used to control output MODBUS_PID_OUTPUT3 , MODBUS_PID_OUTPUT4 , MODBUS_PID_OUTPUT5 , MODBUS_PID_OUTPUT6 , MODBUS_PID_OUTPUT7 , //Address 254 MODBUS_UNIVERSAL_OUTPUT_BEGIN , // 0 255 Binary output state for each of the 7 modes of operation MODBUS_UNIVERSAL_OUTPUT_COOL1 , MODBUS_UNIVERSAL_OUTPUT_COOL2 , MODBUS_UNIVERSAL_OUTPUT_COOL3 , MODBUS_UNIVERSAL_OUTPUT_HEAT1 , MODBUS_UNIVERSAL_OUTPUT_HEAT2 , MODBUS_UNIVERSAL_OUTPUT_HEAT3 , //Address 261 MODBUS_UNIVERSAL_VALVE_BEGIN , // 0 255 Analog output state for each of the 8 modes of operation MODBUS_UNIVERSAL_VALVE_COOL1 , MODBUS_UNIVERSAL_VALVE_COOL2 , MODBUS_UNIVERSAL_VALVE_COOL3 , MODBUS_UNIVERSAL_VALVE_HEAT1 , MODBUS_UNIVERSAL_VALVE_HEAT2 , MODBUS_UNIVERSAL_VALVE_HEAT3 , //Address 268 MODBUS_HEAT_UNIVERSAL_TABLE, // 0 6 number of heating stages in universal table MODBUS_COOL_UNIVERSAL_TABLE, // 0 6 number of cooling stages in universal table MODBUS_PID_UNIVERSAL , // 0 100 register 270,universal pid value MODBUS_UNITS1_HIGH , // 0 65535 register 271,upper 2 bytes of universal table1 units in ASCII MODBUS_UNITS1_LOW , // 0 65535 register 272,lower 2 bytes of universal table1 units in ASCII MODBUS_UNITS2_HIGH , // 0 65535 register 273,upper 2 bytes of universal table2 units in ASCII MODBUS_UNITS2_LOW , // 0 65535 register 274,lower 2 bytes of universal table2 units in ASCII MODBUS_UNIVERSAL_NIGHTSET , // 0 65535 universal pid night setpoint MODBUS_HEAT_ORIGINAL_TABLE , // 0 6 register 276,number of heating satges in original table MODBUS_COOL_ORIGINAL_TABLE , // 0 6 register 277,number of coling stages in original table MODBUS_PID2_MODE_OPERATION, // 0 19 register 278,cooling or heating states when universal PID is working // coasting 0 cooling1 1 cooling2 2 cooling3 3 cooling4 14 cooling5 15 cooling6 16 // heating1 4 heating2 5 heating3 6 heating4 17 heating5 18 heating6 19 MODBUS_VALVE_TRAVEL_TIME , // 10 255 register 279,the max time that the valve travel from one end to another end,the real value should be divided 10,the units is second //Addres 280 MODBUS_MODE_OUTPUT1, // 0 0 now output 1 to 3 has only one mode,it is ON/OFF mode MODBUS_MODE_OUTPUT2, // 0 0 MODBUS_MODE_OUTPUT3, // 0 0 MODBUS_MODE_OUTPUT4, // 0 1 the two outputs have two mode, on/off and floating valve MODBUS_MODE_OUTPUT5, // 0 1 0:ON/OFF; 1:floating valve MODBUS_VALVE_PERCENT, // 0 100 register 285,the valve position in percent MODBUS_INTERLOCK_OUTPUT1, // 0 5 register 286,the interlock items MODBUS_INTERLOCK_OUTPUT2, // 0 5 0, interlock always ON 1, DI1 determine the interlock status MODBUS_INTERLOCK_OUTPUT3, // 0 5 2, AI1 determine the interlock status 3, AI2 determine the interlock status MODBUS_INTERLOCK_OUTPUT4, // 0 5 4, The relays status determined by "timer | pid1" 5, The relays status determined by "timer & pid1" MODBUS_INTERLOCK_OUTPUT5, // 0 5 register 290 MODBUS_INTERLOCK_OUTPUT6, // 0 5 register 291 MODBUS_INTERLOCK_OUTPUT7, // 0 5 register 292 MODBUS_SETPOINT_INCREASE, // 1 10 register 293 the step when change the setpoint,the units is C or F,should be divided 10 MODBUS_LAST_KEY_TIMER // 0 65535 register 294 record the time since the last pressed key MODBUS_FREEZE_TEMP_SETPOINT, // -127 +127 register 295 temperature setpoint for freeze protect MODBUS_FREEZE_DELAY_ON, // 5 255 register 296 go to heating mode if temperature less than freeze protect setpoint in xx SECONDS MODBUS_FREEZE_DELAY_OFF, // 5 255 register 297 stay heating mode xx MINUTES MODBUS_ANALOG1_FUNCTION, // 0 2 298,which function is the analog input1.0,normal;1,freeze protect;2,occupancy sensor MODBUS_ANALOG2_FUNCTION, // 0 2 299,which function is the analog input2.0,normal;1,freeze protect;2,occupancy sensor MODBUS_DIGITAL1_FUNCTION, // 0 2 300,which function is the digital input1.0,normal;1,freeze protect;2,occupancy sensor MODBUS_TIMER_ON, // 0 65535 301,the timer will ON how long time MODBUS_TIMER_OFF, // 0 65535 302,the timer will OFF how long time MODBUS_TIMER_UNITS, // 0 2 303,timer units.0,hour;1,minute;2,second MODBUS_KEYPAD_VALUE, // 0 255 304,display the value read from P0 port when a keypay is pressed MODBUS_DISPLAY_HUNDRED, // 0 255 305,The hundred bit of LEDs will show the value which receive from serial port MODBUS_DISPLAY_TEN, // 0 255 306,The ten bit of LEDs will show the value which receive from serial port MODBUS_DISPLAY_DIGITAL, // 0 255 307,The one bit of LEDs will show the value which receive from serial port MODBUS_DISPLAY_STATUS, // 0 255 308,The status bit of LEDs will show the value which receive from serial port MODBUS_INPUT_MANU_ENABLE, // 0 255 309,manual or auto mode select,0,auo;1,manual.each bit of this byte correspond to an input channel.0,analg1;1analog2;2,digital1 MODBUS_OUTPUT_MANU_ENABLE, // 0 255 310,manual or auto mode select,0,auo;1,manual.each bit of this byte correspond to an output .bit0--4, to output1--output5 MODBUS_DIGITAL_INPUT, // 0 1 311,digital input1 value,only valid when the correspond bit is set manual MODBUS_MANU_RELAY1, // 0 1 312.open or close relay1 when the relay1 is set to work in MANUAL mode.write 0 to the register close the relay manually,rverse write 1 MODBUS_MANU_RELAY2, // 0 1 313.open or close relay2 when the relay2 is set to work in MANUAL mode.write 0 to the register close the relay manually,rverse write 1 MODBUS_MANU_RELAY3, // 0 1 314.open or close relay3 when the relay3 is set to work in MANUAL mode.write 0 to the register close the relay manually,rverse write 1 MODBUS_MANU_RELAY4, // 0 1 315.open or close relay4 when the relay4 is set to work in MANUAL mode.write 0 to the register close the relay manually,rverse write 1 MODBUS_MANU_RELAY5, // 0 1 316.open or close relay5 when the relay5 is set to work in MANUAL mode.write 0 to the register close the relay manually,rverse write 1 MODBUS_DEAD_MASTER, // 0 255 317.Store the value which determine how long time the Tstat will go occupied mode after power on and see no serial communication. // The value range of the registeris 0 to 255 and the units is minute.If 0 is assigne din the register means that disable dead mater feature. MODBUS_ROUND_DISPLAY, // 0 5 318.Rounding display.There are three possible settings. 0 means round off the display to the neares digit.1 means round to the nearest 1/10 unit, // this is the default;5 means round to the nearest 1/2 unit. MODBUS_MIN_ADDRESS , // 1 254 319 // Minimum allowed address MODBUS_MAX_ADDRESS, // 1 254 320 // Maximum allowed address MODBUS_FAN_GRIDPOINT, // 1 4 321 // Fan speed for gridpoint MODBUS_MODE_GRIDPOINT, // 0 3 322 // Work mode for gridpoint,off,cool,heat,emergency MODBUS_HOLD_GRIDPOINT, // 0 1 323 // 0 = disable hold mode,1 = enable hold mode MODBUS_CONFIGURATION, // 0 1 324 // 0 = load/save as the first congiguration file,1 = load/save as the second configuration file MODBUS_UTIL_MODE, // 0 1 325 // 0 = disable util mode,1 = enable util mode MODBUS_EEPROM_SIZE, // 0 1 326 // 0 = the tstat with a smaller e2 chip can not load two configurations,1 = the tstat with a bigger e2 chip and can load two configuration files MODBUS_TIMER_SELECT, // 0 2 327 // 0 = period timer,1 = rotation timer, 2= interlock timer MODBUS_OUTPUT1_FUNCTION, // 0 2 328 // output finction.0 = normal,1 = rotation,2 = lighting control. MODBUS_ROTATION_OUT2, // 0 2 329 // Show which output is working if the corresponding ouput be configured as rotation in output function MODBUS_ROTATION_OUT3, // 0 2 330 // Show which output is working if the corresponding ouput be configured as rotation in output function MODBUS_ROTATION_OUT4, // 0 2 331 // Show which output is working if the corresponding ouput be configured as rotation in output function MODBUS_ROTATION_OUT5, // 0 2 332 // Show which output is working if the corresponding ouput be configured as rotation in output function MODBUS_ROTATION_TIME_LEFT, // 0 65535 333 // Left how much time the rotation will active MODBUS_OUTPUT2_FUNCTION, // 0 2 334 // output finction.0 = normal,1 = rotation,2 = lighting control. MODBUS_OUTPUT3_FUNCTION, // 0 2 335 // output finction.0 = normal,1 = rotation,2 = lighting control. MODBUS_OUTPUT4_FUNCTION, // 0 2 336 // output finction.0 = normal,1 = rotation,2 = lighting control. MODBUS_OUTPUT5_FUNCTION, // 0 2 337 // output finction.0 = normal,1 = rotation,2 = lighting control. MODBUS_DEFAULT_SETPOINT, // 0 255 338 // default setpoint,limited by min and max setpoint MODBUS_SETPOINT_CONTROL, // 0 1 339 // default setpoint control.0 = use normal setpoint,1 = the setpoint is default setpoint,2 = use default setpoint instead of normal setpoint }; //REV 32.8 //MHF 08-015-2007 Changed the PON and POF as LON and LOF on the LED display for AUX button // Added the PON and POF on the LED display for PIR button // Fixed the code related to PIR function //REV 32.7 //MHF 08-09-2007 Changed the versuon number as 32.7 //REV 32.6 //MHF 08-07-2007 Added PON and POF on the LED display for PIR feature //MHF 07-23-2007 Added default setpoint feature,added two register .One for default setpoint and another for setpoint control. //REV 32.5 //MHF 07-23-2007 Fixed interlock timer bug,The timer_flag should be set according to interlock set. //REV 32.6 //MHF 08-07-2007 Added PON and POF on the LED display for PIR feature //MHF 07-23-2007 Added default setpoint feature,added two register .One for default setpoint and another for setpoint control. //REV 32.5 //MHF 07-23-2007 Fixed timer interlock bug,The timer flag should be set according to the correspond interlock set. //REV 32.4 //MHF 07-20-2007 Fixed the bug the relay with interlock will turn off after change the setpoint via serial port. //REV 32.3 //MHF 07-18-2007 Fixed factory default ,now read data from flash when write 143 to register16. // Keep the c/f degree after write 143 to register 16,before fixed degree c. // Added a new keypad mode 6C for tstat with six buttons //REV 32.2 //MHF 07-04-2007 Fixed the temp flickering bug // Fixed the bug the tstat is unusable after loaded configuration file // Use gridpoint's output table as default output table after updated new firmware //REV 32.1 //MHF 07-03-2007 I Fixed the pid math in the attached hex file to resolve the flick bug. //REV 31.9 //MHF 06-13-2007 Fixed the initilization when HC mode is keypad. //REV 31.8 //MHF 06-12-2007 Fixed timer interlock //REV 31.7 //MHF 06-06-2007 Get rid of the limitation for cooling deadband and heating deadband. //REV 31.6 //MHF 05-24-2007 The tstat will take effect after the button be released // Fixed the bug the menu still on even do not operate it in 5 seconds // The hold LED will turn on you press the up and down temp button simultaneously 5 seconds. // Added a timer for interlock output.Please configure the following registers before you use this feature. //REV 31.5 //MHF 05-15-2007 Delay the button take effect after be pressed // Short the time enter or and exit HOLD mode // Make sure the HOLD mode take effect after the button be released //REV 31.4 //MHF 04-29-2007 Fixed issues about C/F converting //REV 31.3 //MHF 04-25-2007 Fixed the setpoint bug when change the C to F or back. // Keep the SOP and C/F same with configuration file when the users go to FAC at keypad. //REV 31.2 //MHF 04-10-2007 Keep the value of UTIL register when change C to F or back. //REV 31.1 //MHF 04-06-2007 Added a limitation to make sure the tstat not go to EMER mode when register 118 = 3. // Changed the e2 chip read routine and serial port communication routine for fixing the read error bug. //REV 31.0 //MHF 04-05-2007 Fixed e2 chip read routine //REV 30.9 //MHF 04-03-2007 Fixed nothing except version number,Checked a new version number will erase E2 chip. //REV 30.8 //MHF 03-29-2007 Fixed the two configuration files not match between before load and after loaded //REV 30.7 //MHF 03-28-2007 Fixed bug that registet 310 can not show the right value. // Fixed the bug the cool and heat mode can not switch if be changed from serail port. //REV 30.6 //MHF 03-26-2007 The SOP has only two values can be selected,1 and 3. // The register 321 and 322 can be write and read,before the wo register are read only. // Added a new register 326 for e2 chip type,0 = old and small e2 chip,1 = new and big e2 chip. //REV 30.4 //MHF 03-20-2007 Added two register for address limitation for gridpoint,Added sop == 3 item to use two config //REV 30.3 //MHF 03-19-2007 Fixed the C/F converter bug. //REV 30.2 //MHF 03-16-2007 Fixed the bugs about util can not read by serial port,hold can not exit from kepad //REV 30.1 //MHF 03-14-2007 Added FAC item in the gridpoint menu.deleted two register 321 and 322 used in util mode. // Added a register 323 for hold mode,write and read.Fixed a bug in mode transition. //REV 30.0 //MHF 03-14-2007 Added advanced menu for grispoint.added util mode and hold mode. //REV 29.9 //MHF 03-08-2007 Fixed the mode register 106 to show coasting when the mode be set OFF by using keypad //REV 29.8 //MHF 03-07-2007 Added two register 321 322 to show fan mode and work mode;fixed the LED to show the work mode // immediately when the user adjut the mode using button //REV 29.7 //MHF 03-06-2007 Fixed the right lower button use for decrease setpoint //REV 29.6 //MHF 03-05-2007 Fixed the write and read routine for e2 chip 24c08 //REV 29.5 //MHF 02-28-2007 Fixed the min and max address register address,fixed the button function,fixed the write and read routin for e2 chip 24c08 //REV 29.4 //MHF 02-01-2007 Fixed the pid arithmetic.The coasting is not as a stage number when caculte pid's switching point // just use cooling stage number plus heating stage number to caculte switching point. // Fixed the analog output state to corespond to the T3000.the analog output 0-100% = 2, // 50 - 100% = 3 ,100% = 1. //REV 29.3 //MHF 02-01-2007 Clear the MSB 4 bits of register 184; Fixed the formula caculating the cooling stage value //REV 29.2 //MHF 01-30-2007 Make sure the cooling deadband and heating deadband less than the cooling_pterm/2. //REV 29.1 //MHF 01-26-2007 Fixed the PI's algorithm //REV 29.0 //MHF 01-19-2007 Added a new range OFF/ON for each input.Fixed the part use DI1 for interlock // In auomode,the register 311 will show the state of DI1 //REV 28.9 //MHF 12-20-2006 In occupied mode,the tstat will go to unocuupied mode after the duration override timer time // if the occupancy sensor input changed.The tstat also go to unoccupied mode after the duration when power up and // the fan speed bigger than zero. //REV 28.8 //MHF 12-09-2006 Fixed the occupied bit make sure the bit can show the right status. //REV 28.7 //MHF 12-05-2006 Fixed occupency sensor mode.In office mode,the tstat will go to occupied mode when the input changing //MHF 11-30-2006 Changed the resolution of valve travel time from 0.1 second to 1 second. //MHF 11-30-2006 Added the averaging sensor feature. A new function setting for a temperature sensor input, it // can be assigned to average with the internal sensor and external sensor then feed back to the PID. //REV 28.6 //MHF 11-21-2006 Delay the tomeout for serila port receive and reset the watch dog when reply mutiple write // //MHF 11-21-2006 Added three functions for analog1,2 input,move the function in register 190 to register 300. // the register 190 only use for digital range.Expanded the digital input function in menu and the parameter // be stored into register 300. //REV 28.5 //MHF 11-07-2006 added a 10 second delay when the mode of operation is decreased //REV 28.4 //MHF 10-26-2006 Initilize the pidoutput array to determine the digital output controlled by which output table. //REV 28.3 //MHF 10-25-2006 Fixed PID2 bug.Can not get the right pid to control the output when the user select min and max funtion in pid control //MHF 09-30-2006 Adjust the involatile data structure because the data has extended the size of E2 chip //REV 28.2 //MHF 09-26-2006 Fixed the pid bug .The Pid will get wrong value as temperature nearby setpoint if set the cool statge equals to zero //REV 28.1 //MHF 09-15-2006 Fixed the code of PID2 part.the PID2 also can work if the range of corresponding inputs is 10K thermistor . // Before the PID2 work only when the range of inputs is customer sensor. //rev28.1 Added sendZero() routine to reduce code space, used by several routines. //REV 28.0 //MHF 08-23-2006 Added register 317 to store the value which determine how long time the Tstat will go occupied mode // after power on and see no serial communication.The value range of the registeris 0 to 255 and the units is minute. // If 0 is assigne din the register means that disable dead mater feature. //MHF 08-28-2006 Added register 318 for rounding display.There are three possible settings. 0 means round off the display to the neares digit. // 1 means round to the nearest 1/10 unit, this is the default;5 means round to the nearest 1/2 unit. //MHF 08-29-2006 Fixed keypad press counter feature.Counting up the value of register 294 from 1 instead of from 0 after any combination of // keys is pressed twice. // //REV 27.9 //MHF 6-25-2006 Added config tool feature.The tstat will transfer the configuration itself to another tstat by pressing // the lower right button.we realized this feature by a define predefine comamnd.So if the user need this // feature ,they have to tell us before we programm tstat. //MHF 7-12-2006 Fixed the keypad 2A mode.Before the user hit the button only one time the tstat will from unoccuipied mode // to occupied mode. And the fan speed also from OFF to AUTO.Later we fixed that,from unoccupied mode to // occpied mode,the user can ajust the fan speed but not just fixed AUTO mode.But this conflict with keypad mode // 2A,because 2A mode can not change the fan speed.So now at 2A mode.From unocucpied mode to occupied mode,the // fan speed is fixed AUTO.At others keypad mode,from unoccupied mode to occupied mode ,the user can changre the // fan speed. //MHF 07-24-2006 Added five register to operate relays when the corresond relay is set to manu mode. // 1,open the relay;0,close the relay. //MHF 07-26-2006 Added a register 15 to select the base address.0,Protocol Address.1,PLC Address //MHF 08-17-2006 Fixed a bug that the Tstat can not go to Cooling stage3 in some cases. //REV 27.8 //MHF 7-12-2006 Fixed the occupancy sensor feature for ShragaThere are two modes about using the feature. // one mode is in office mode and another mode is in hotel mode.Now we have only way to change the // tstat go to occupied mode ,that is write 1 to register 184.Before the tstat go to occupied mode ifthe user // change the fan speed from 0 to a value bigger than 0.Now we change the fan speed whatever mfrom keypad or // serial port,tstat will reset the override timer. //REV 27.7 //MHF 4-27-2006 Added a function item for each input.the function include "normal","freeze protect","occupancy sensor" //MHF 4-27-2006 Added auto/manu control bit for each input and output //REV 27.6 //MHF 3-27-2006 Added freeze protect feature //MHF 3-27-2006 Added timer ON feature,The corespond relay will turn on several minutes after TSTAT run some time //REV27.5 //MHF 03-01-2006 Changed the value range of filter .The filter can be set from 0 to 100. //RL:06-02-16 update documents for hotel/office deadband. document information were flipped. Office is setpoint. Hotel is Deadband //REV27.4 //RL:06-02-09 added LED table option Stage_1-2-3 and Stage_2-3 //MHF: 06-02-14 added fan speed change for Kevin in keypad 2B settings //REV27.3 //MHF:06-01-20 Fixed trigger override timer mode ,any key be pressed the Tstat enter override timer mode //REV27.2 //MHF:06-01-20 Fixed the tempetature display mode on LEDs //REV27.1 //MHF:06-01-20 Clear item zero when the temperature in deadband area //REV27-0 //RL:06-01-05 removed EA=0 lines from the pic read function. reduced flicker to the display // note that pic was left unchanged. May be possible that there are less pic reads // in the future may observe pic reads not as fast... //RL:06-01-06 placed back the code which now only enables writing to hardware-rev and Product-Model only once //REV26.9 //MHF:12-26-05 Fixed pid algorithm.change the pid_error arithmetic when at coating // mode to make iterm decrease and increase fast //MHF:12-27-05 Fixed the protocol of scan.Now read and write register 10 not Modbus protocol. // Because added serialnumber data in the data packet //MHF:12-29-05 Fixed occupied_trigger_handler() and related to make bit3 ofregister 184 can show // Digital input1 status at any time and any case //REV26.8 //MHF:11-14-05 fixed pid bug .expanded pterm greater than night_cooling_db + night_heating_db //ron:11-14-05 added flash_info function at code 0x100 //MHF:11-24-05 Added a register for last key pressed timer //MHF:12-15-05 Added serialnumber data when reply modbus function 25 //REV26.7 //MHF 10/25/05 Fixed the value range of 107 MODBUS_MODE_OPERATION register for compatible backward.Now use the following value: // coasting 0 cooling1 1 cooling2 2 cooling3 3 cooling4 14 cooling5 15 cooling6 16 // coasting 0 heating1 4 heating2 5 heating3 6 heating4 17 heating5 18 heating6 19 //MHF:10/28/05 Fixed pid bug ,the PID was winding up past 100, taking too long to wind down. // Also in the deadband region, made sure the I term can decay but will not incease. //MHF:10/28/05 Added 0---50% item for output table to determin how much the valve open.now the EEP_VALVE_OPER_TABLE_BEGIN register every bit is defined like this: // 7 : '0' heating valve(output7)not select 0---50% ; '1' heating valve(output7)select 0-----50% // 6 : '0' cooling valve(output6)not select 0---50% ; '1' cooling valve(output6)select 0-----50% // 5 4 : floating valve ,the range of valve open // 3 2 : heating valve(output7), the range of valve open // 1 0 : cooling valve(output6),the range of valve open //MHF:10/31/05 After a load of the configuration file or new hex file of the same rev number, the occupied state is left unchanged. // (if the hex file is a major update requiring the flash to be erased, // then the occupied stat is lost after a hex file s sent. ) // changed file :serial.c // fixed some code when POM == 1, in this mode,only when fan_speed_usee ==0 do something // changed file :tstat.c //MHF:11-07-05 when tstat at unoccupied status ,recaculate cooling_db and heating_db to make PID work correctly // changed setpoint() and update_pid() function //MHF:11-09-05 Fixed calibration bug which if TSS = 0,could not calibrate //MHF:11-10-05 Fixed LED status,turn all leds off except OFF led when the tstat working in the OFF mode, the left vertical row of status leds. //MHF:11-11-05 Fixed occupied status in REG184,if the fan speed goes greater than 0 from the keypad, then the occupied bit goes to 1 (TRUE) // if Fan speed goes to zero from the keypad, the occupied bit is 0 (False). // at night, if the fan goes on to maintain the night setpoint, // then the occupied bit stays at 0. // //MHF:11-11-05 limit TSS less than 2 if the tstat is 5A or 5B ,because the tstat 5A and 5B only have // temperature chip and external thermostor //REV26.6 //MHF 9/23/05 Add DDC mode in AUTO_ONLY regiser to make the user can not change setpoint and ON/OFF mode from keypad. // The user only can change these things from serial port. //MHF 9/23/05 Add interlock for each output.Add seven registers 285 to 293 to store the interlock, connected to inputs only (for now). //MHF 9/27/05 Added a new register to adjust the setpoint increment as a user variable. We store it as a user defined variable // in a one byte register, minimum value is 0.1, the maximum value could be set at 1.0.Now cooling setpoitn and // heatinng setpoint are stored in the E2 chip by using two bytes.Whatever the setpoint be set by keypad or serial port // the setpoint value should multiply 10. //MHF 9/28/05 Tss register is left unchanged when the user changes C to F or F to C. //MHF 9/28/05 Added a new item DEF which store current configuration into flash as new default in the menu //MHF 10/5/05 Tstat displays "---" when the tstat can not detect the pic chip though there is a pic chip //MHF:10/24/05 if the tstat is working on OFF mode,turn off cool and heat LED, lower row of status leds. //REV26.5 //MHF 9/6/05 shorten the delay between chatacters when tstat response .the tstat response should have a pause between two characrers, // but the maximum allowed pause is 1.5 character times or .83 ms * 1.5 or 1.245 ms at 9600 baud. //MHF 9/21/05 The baudrate does not change after changed C to F or back. //MHF 9/22/05 Fixed bug in TSS register.Because the TSS can not be set to zero even that the tstat has internal teperature // sensor when update the tstat's software from before revision 26.4 to after revision 26.4 . //REV26.4 //MHF 8/18/05 Added "floating valve" feature.Added five registers from 280 to 284 to determine relay1 to relay5 output mode. // Relay 4 and relay5 be used to control valve by pulse mode if MODE_OUTPUT4 AND MODE_OUTPUT5 be set '1'. // in this mode,the relays not be controled by PWM. //REV26.3 //MHF 8/18/05 fixed the original PID's Pterm = cooling_db+heating_db+10 to avoid always staying coasting mode // because of the user set the Pterm less than cooling_db plus heating_db //REV26.2 //MHF 7/12/05 Added PWM to pin ENABLE_2003, for decrease the current by using pulse control relays. // TODO allow writes to registers 180, 181, 215, 216 - automatically adjust calibration values when writing to these registers. //REV26.1 // MDF 6/23/05 Fixed bug in EEP location of UPDATE_STATUS register.. // tstat.c, serial.c, define.h // MDF 6/30/05 Got rid of LED_Init_table and function. LED defaults now stored same as the rest of the b.eeprom registers. // tstat.c, serial.c, define.h // MDF 6/30/05 Set Flash-stored address to 0 whenever writing to EEPROM-stored address. This invalidates the address stored in Flash. // tstat.c, serial1.c // MDF 6/30/05 Reset factory defaults to 0 at startup. // tstat.c // MDF 6/30/05 Added a prevention measure so that 0 or 255 cannot be written to the address. // serial.c // tbd... ask ron about the address initialisation... i wanna add some code but doesn't seem to work out... //REV25.7 // MDF 4/30/05 Added MODBUS_OVERRIDE_TIMER_LEFT to hold the remaining value on the override timer. // serial1.c // MDF 4/30/05 Implemented display blank option by setting MODBUS_DISPLAY = 2. // display.c // MDF 5/01/05 Created calibration terms for both the Analog In2 and for the Internal Thermistor . // modbus.h, define.h, tstat.c, serial1.c, output.c // MDF 5/01/05 Created registers to show the internal temperature sensor IC and the internal thermistor value at all times. // modbus.h, define.h, serial1.c, // MDF 5/01/05 Combined CAL and CAE into one menu item, making it automatically adjust the correct calibration term based on the TSS.. // LibDisplay.h, tstat.c // MDF 5/19/05 Fixed bug. 5Bs were not reading the temperature chip because they do not have analog inputs.. // output.c // MDF 5/24/05 Fixed bug in filtering algorithm.. // output.c, temperature.c // MHF 5/25/05 Added partial menu lock.. // tstat.c // MDF 5/30/05 Fixed bug in calibration implementation regarding degrees F. // tstat.c, serial1.c // MDF 6/3/05 Set Flash-stored address to 0 whenever writing to EEPROM-stored address. This invalidates the address stored in Flash. // output.c, temperature.c //REV25.6 // MDF 4/19/05 Adjusted HC setting so that when the external sensor is hotter, we are in heating mode, not cooling mode.. // control_logic.c // MDF 4/20/05 Rearraged location of many RAM variables to free up space in the data memory. // control_logic.c // MDF 4/20/05 Gave serial interrupt priority to reduce communication errors // tstat.c // MDF 4/25/05 Added a prevention measure so that 0 or 255 cannot be written to the address. // serial.c // MDF 4/28/05 Reset factory defaults to 0 at startup. // tstat.c // MDF 4/28/05 Fixed factory defaults bug when setting defaults from keypad. // tstat.c //REV25.5 // MDF 4/05/05 Made TEMPERATURE FILTER a variable rather than a constant. Set up new menu item, FIL, to control this variable. // serial1.c, tstat.c, LibDisplay.h, Temco.h, define.h, temperature.c // MDF 4/07/05 Added support for the Tstat5B2 // tstat.c // MDF 4/08/05 Change plug_n_play address to register 10. // modbus.h // MDF 4/14/05 Fixed bug that caused the iterm to rollover from a positive to a negative number. // PID.c // MDF 4/14/05 Adjusted filter so that the temperature does not jump when the new reading is very different. // temperature.c // REV25.4 // RL 03/25/05 update_status missing in the ISP update routine in Ver25.3 // update_status variable was missing when writting through modbus, therefore no update was possible given Tstat did not reset // MDF 4/01/05 Fixed bug in check hardware and model regarding 5A with rev0 hardware // tstat.c, // MDF 4/01/05 Made change to auto_plug_and_play check_data() routine. Now tstat will not respond if randval != 1; // serial1.c, //REV25.2 // MDF 1/27/05 Fixed bug in PID. // pid.c, // MDF 1/28/05 Fixed bug that prevented tstat from jumping into ISP mode.. // serial.c, // MDF 3/23/05 Changed PID so that iterm will continue to influence the tstat even when the temperature is between the deadbands // pid.c, //REV25.1 // MDF 12/30/04 Changed the function of occupied/unoccupied. It no longer has a correlation to fan speed. The mode can // only be changed by the digital input or by a command from the modbus. // tstat.c, keypad.c, serial.c // MDF 1/6/05 If there is an E2 error, the tstat no longer freezes. instead it simply does not start up any of the timers. // the serial communications will still work. This is to allow you to adjust the // product model and hardware rev registers // tstat.c // MDF 1/11/05 Added 2 more button configurations - 2b and 4b. 2b is the same as 2, except cooling and heating mode // can only be controlled via the serial interface. In 4b, the lower left button switches between cooling // and heating mode, while the lower right button scrolls through the fan speeds - off, 1, 2, 3, auto. // tstat.c, serial.c, control_logic.c, temco.h // MDF 1/14/05 Implemented blinking display whenever setpoint or fan speed is changed via the serial interface. // serial.c, //REV25.0 // MDF 7/14/04 Added display_integer() to show integers better in the menu // tstat.c // MDF 8/2/04 analog input is now raw the look_up_table now gets applied when checking temperature // output.c, pic.c // MDF 8/4/04 Added code to display setpoint instead of temperature according to menu item, dIS // temperature.c, temperature.h, define.h, modbus.h, serial1.c // MDF 8/4/02 added code to check for an analog module on Tstat5C boards // tstat.c // MDF 8/5/04 Added code to allow tstat5c to do analog out functions // output.c // MDF 8/5/04 Changed extern_operation_default table so that OUT4 and OUT5 correspond to table. // Temco.h, Output.c // MDF 8/5/04 Added code so that an Analog Tstat can fuction as ON/OFF // output.c // MDF 8/16/04 Added code to automatically switch between displays depending on the // hardware revision. // tstat.c, libdisplay.h // MDF 8/17/04 Setup PRODUCT_MODEL and HARDWARE_REV registers to keep track of // the hardware and model. // tstat.c, Temco.h, revision.h, serial1.c, define.h // MDF 8/18/04 changed default sop1 table for Fan OFF to match AUTO // now that we have the occupied/unoccupied settings working correctly // control_logic.h // MDF 9/16/04 Changed the default valve setting table for Heating2 and Cooling2. // control_logic,h // MDF 9/21/04 Added short cycle and changeover delays for the mode of operation. // control_logic.c, tstat.c // MDF 9/21/04 Increased max temperature and setpoint to allow tstat to function with boilers. // if the temperature/setpoint goes over 100, the decimal point gets shift in order to display properly. // tstat.c, define.h, temperature.c // MDF 10/20/04 Added 15ms delay anytime a relay switches to avoid reading or writing to the EEPROM during a switch. // output.c // MDF 10/20/04 Setup system of registers to control the functionality of the LEDs // modbus.h, serial1.c, tstat.c // MDF 10/24/04 Setup bit1 of info_byte to reflect a watchdog reset. SRS will be displayed on power-up // tstat.c // MDF 10/24/04 Setup bit2 of info_byte to prevent reset during serial writes. // serial.c // MDF 10/12/04 Added code to control zero-voltage crossing based on External Interrupt 1 // output.c, tstat.c // MDF 10/12/04 Added Low voltage test to prevent writing to the E2 chip if the voltage gets too low // tstat.c, TH_ee.c // RL 18/11/04 // - added memory storage when doing ISP. NOw only has laddress in it. If more data... need to do memory allocation // MDF 12/01/04 added a 2nd query of PIC on startup incase first one was missed. // pic.c // MDF 12/01/04 Changed routines of PIC slightly to fix small bugs in I2C communication. // pic.c // MDF 12/06/04 Added feature to tSS and DI1 to allow for 2-pipe operation. // Temco.h, control_logic.c // MDF 12/06/04 Added Ort - OVERRIDE_TIMER to allow user to override the unoccupied mode of the clock // Temco.h, define.h, LibDisplay.h, tstat.c // MDF 12/07/04 Fixed bug with changing the address from the keypad menu // tstat.c // MDF 12/08/04 Changed units of output delays from 0.1 seconds to 1.0 seconds // tstat.c, output.c // MDF 12/08/04 Modified the update_status register to allow for a complete erase of the eeprom by writing 0x8F // tstat.c, serial.c // MDF 12/10/04 Users now allowed to write to the COOL_HEAT_MODE register if tstat is in 6-button mode. // serial.c // MDF 12/14/04 Fixed eeprom erase function triggered by writing to register 16.. // tstat.c // MDF 12/14/04 Fixed serial write to AUTO_ONLY. // serial.c //REV24.4 // MDF 6/29/04 Added code to switch between occupied and unoccupied mode // upon trigger of digital input // tstat.c, Temco.h // MDF 6/30/04 Added menu items, night heating setpoint, night cooling setpoint. // tstat.c, define.h, temco.h, LibDisplay.h, modbus.h // MDF 7/1/04 Added response_data() before reset on certain serial com items so that tstat replies // before resetting. // serial1.c // MDF 7/5/04 Moved the addition of the calibration term to after the temperature filtering. // temperature.c // MDF 7/5/04 Changed code so that AUT=0 allows manual fan speeds. AUT=1 only allows off and auto // tstat.c, serial1.c //REV24.3 // MDF 6/21/04 TXEN pin needs to be set low immediately. This will prevent interference // on the 485 bus in case of E2 failure // tstat.c // MDF 6/24/04 Now make sure that the fan does not increase above the allowed level set by FAN_MODE // control_logic.c, Temco.h, tstat.c // MDF 6/25/04 changed the timing of responses to valid and invalid packets. // 4ms needed to recover from invalid packet. 10ms delay when responding to a valid packet. // serial1.c, tstat.c, serial.h //REV24.2 // MDF 6/1/04 Increased the EVENT_QUEUE_SIZE from 3 to 6 // define.h // MDF 6/1/04 Changed display of nHS and nCS parameter to nHd and nCd // tstat.c // MDF 6/7/04 Added REVT define to specify for various differences in the new tstat // define.h, Temco.h // MDF 6/7/04 Added EXTERNAL_SENSOR_1 // define.h, modbus.h, serial1.c //REV24.1 // MDF 5/3/04 Changed LED_r to look better when displayed. // LibDisplay.h // MDF 5/7/04 Added register 180 - EXTERNAL_SENSOR_0 register. now // it is possible to always read the external sensor reading regardless of TEMP_SELECT. // modbus.h, define.h, serial.c, output.c // MDF 5/31/04 - Changed default night heating and cooling setbacks from 3 to 10 // temco.h // 4/5/04-Rev.24 Added code to initialize_eeprom() to set the address to 1 as a default. // MF 4/13/04 when an on/off module is detected, MUX pins will also be used to drive relay4 and relay5 // MDF 4/29/04 re-wrote modbus routines to comply with modbus standards and to reduce error rate // serial1.c, tstat.c - COMDEALWITH