+unsigned int writebyte_eeprom(unsigned int *p, unsigned int *sum, unsigned char b)
+{
+ ClrWdt();
+ if(eeprom_writebyte(*p, b) == 0) return *p; // Error
+ *sum = calcsum_byte(*sum, b);
+ *p = *p + 1;
+ return 0xffff;
+}
+
+unsigned int writeword_eeprom(unsigned int *p, unsigned int *sum, unsigned int word)
+{
+// ClrWdt();
+ if(writebyte_eeprom(p, sum, word >> 8) == 0) return *p; // Error
+ if(writebyte_eeprom(p, sum, word & 0xff) == 0) return *p; // Error
+ return 0xffff;
+}
+
+