;****************************************************************************** ; VARIABLES USED BY PROGRAM ;****************************************************************************** ; copyright PMB 2006 ; RAM description used in ; ----------- -------------------------- ---------------------------------------------- ; TX_BUF = TX buffer ISR_STX RS_TX ; RX_BUF = RX buffer ISR_SRX RX_GET RX_ERR ; TX_WPTR = TX buffer read pointer ISR_STX TX_GAP2 TX_CHAR TX_CRLF CTM_MSG RS_TX ; TX_RPTR = TX read read pointer ISR_STX RS_TX ; RX_WPTR = RX buffer read pointer ISR_SRX RX_ERR ; RX_RPTR = RX read read pointer ISR_SRX RX_GET RX_ERR ; TMP3 = temporary variable ISR_SRX ; VAR1_L = temporary variable RX_GET ; B1TMP1 = temporary variable RX_GET TX_WTB TX_CHAR CTM_MSG ; ISRCNT = ISR timeout cycle counter ISR_TO ; TMP4 = temporary variable ADC ; TICK = 10mS clock counter RTC ; SEC = seconds RTC ; MIN = minutes RTC ; HRS = hours RTC ; Variables used in eeprom support: ; RXDAT = I2C receive data . ; TXDAT = I2C transmit data . ; I2CADD = I2C/EEPROM address . ; I2CWRK = I2C/EEPROM working register . ; BITCNT = I2C/EEPROM bit counter . ; RDBCNT = I2C/EEPROM read byte counter . ; ATTCNT = I2C/EEPROM attempt counter . ; Temporary variables used within subroutines. ; TMP? used within interrupt routines. Note that multiple interrupts may ; occur at the same time. ; VAR?_? cannot be used within interrupts. These subroutines may be interrupted. ;****************************************************************************** ; FLAGS USED BY HCM_*** PROGRAM ;****************************************************************************** ; FLAGS1 (gp working flags) ; 00000000 ; |||||||| ; |||||||\-- flag as verify (don't save data) 1 = verify ; ||||||\--- RTC alternate pass flag 1 = yes ; |||||\---- ISR has occured flag 1 = ISR yes ; ||||\----- I2C dummy write selected 1 = yes ; |||\------ read one byte or many 1 = one ; ||\------- SIN new message loaded to send 1 = yes ; |\-------- SIN message sent, ready for next 1 = yes ; \--------- eeprom access in progress 1 = yes ; FLAGS2 (gp working flags) ; 00000000 ; |||||||| ; |||||||\-- . 1 = yes ; ||||||\--- . 1 = yes ; |||||\---- . 1 = yes ; ||||\----- . 1 = yes ; |||\------ seconds roll-over 1 = yes ; ||\------- minutes roll-over 1 = yes ; |\-------- . 1 = yes ; \--------- . 1 = yes ; FLAGS3 (gp working flags) ; 00000000 ; |||||||| ; |||||||\-- identified DS1820/DS18S20 1 = yes ; ||||||\--- identified DS18B20 1 = yes ; |||||\---- disable ISR during eeprom access 1 = yes ; ||||\----- eeprom config V1 or V2 1 = V2 ; |||\------ DS18B20 detect failed 1 = yes ; ||\------- temperature reading pass/fail flag 1 = pass ; |\-------- DS18B20 initalisation failed 1 = OK ; \--------- DS18B20 alternate pass flag 1 = yes ; FLAGS4 (gp working flags) ; 00000000 ; |||||||| ; |||||||\-- time period re-sync required 1 = yes ; ||||||\--- 1 = yes ; |||||\---- return "all" characters from RX_GET 1 = yes ; ||||\----- 1 = yes ; |||\------ 1 = yes ; ||\------- new RX message 1 = yes ; |\-------- 3-beeps (NO) 1 = yes ; \--------- 1-beep (YES) 1 = yes ; FLAGS5 (gp working flags) ; 00000000 ; |||||||| ; |||||||\-- . 1 = yes ; ||||||\--- . 1 = yes ; |||||\---- . 1 = yes ; ||||\----- . 1 = yes ; |||\------ . 1 = yes ; ||\------- . 1 = yes ; |\-------- . 1 = yes ; \--------- . 1 = yes ; FLAGS6 (RS-232 gp working flags in Bank-1) ; 00000000 ; |||||||| ; |||||||\-- 1 = yes ; ||||||\--- 1 = yes ; |||||\---- RX skip spaces 1 = yes ; ||||\----- echo enabled 1 = yes ; |||\------ RX failed 1 = yes ; ||\------- 1 = yes ; |\-------- process aborted 1 = yes ; \--------- TX running 1 = yes ;************ ; FLAGS8 (config flags, saved to eeprom) ; 00000000 ; |||||||| ; |||||||\-- . 1 = yes ; ||||||\--- . 1 = yes ; |||||\---- . 1 = yes ; ||||\----- . 1 = yes ; |||\------ . 1 = yes ; ||\------- . 1 = yes ; |\-------- . 1 = yes ; \--------- . 1 = yes ; FLAGS9 (config flags, saved to eeprom) ; 00000000 ; |||||||| ; |||||||\-- 1 = yes ; ||||||\--- 1 = yes ; |||||\---- 1 = yes ; ||||\----- eeprom config V1 or V2 1 = V2 ; |||\------ 1 = yes ; ||\------- 1 = pass ; |\-------- 1 = OK ; \--------- 1 = yes ;************ ; CTRL1A control byte ; CTRL1B control byte ; CTRL1C control flags ; 00000000 ; |||||||| ; |||||||\-- . 1 = yes ; ||||||\--- . 1 = yes ; |||||\---- . 1 = yes ; ||||\----- . 1 = yes ; |||\------ . 1 = yes ; ||\------- . 1 = yes ; |\-------- . 1 = yes ; \--------- . 1 = yes ; CTRL2A control byte ; CTRL2B control byte ; CTRL2C control flags ; 00000000 ; |||||||| ; |||||||\-- . 1 = yes ; ||||||\--- . 1 = yes ; |||||\---- . 1 = yes ; ||||\----- . 1 = yes ; |||\------ . 1 = yes ; ||\------- . 1 = yes ; |\-------- . 1 = yes ; \--------- . 1 = yes ; CTRL3A control byte ; CTRL3B control byte ; CTRL3C control flags ; 00000000 ; |||||||| ; |||||||\-- . 1 = yes ; ||||||\--- . 1 = yes ; |||||\---- . 1 = yes ; ||||\----- . 1 = yes ; |||\------ . 1 = yes ; ||\------- . 1 = yes ; |\-------- . 1 = yes ; \--------- . 1 = yes ;************ ; STATS1 current status flags ; 00000000 ; |||||||| ; |||||||\-- . 1 = yes ; ||||||\--- . 1 = yes ; |||||\---- . 1 = yes ; ||||\----- eeprom error 1 = yes ; |||\------ internal temperature shutdown 1 = shutdown ; ||\------- comms error 1 = yes ; |\-------- temperature sensor status 1 = fault ; \--------- 1 = yes