Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/eeprom_rs232.asm @ 720:4452837aff37
Vault date and time during update
| author | heinrichsweikamp |
|---|---|
| date | Sun, 26 May 2013 11:58:56 +0200 |
| parents | 39e02673db4c |
| children | c50296c3059e |
comparison
equal
deleted
inserted
replaced
| 719:ad5ab9910820 | 720:4452837aff37 |
|---|---|
| 247 goto restart | 247 goto restart |
| 248 | 248 |
| 249 uart_115k_bootloader1: | 249 uart_115k_bootloader1: |
| 250 movlw 0xC1 | 250 movlw 0xC1 |
| 251 cpfseq RCREG ; 115200Baud Bootloader request? | 251 cpfseq RCREG ; 115200Baud Bootloader request? |
| 252 bra uart_115k_bootloader2 ; No, Abort | 252 bra uart_115k_bootloader2 ; No, Abort |
| 253 | |
| 254 ; Vault date and time during update | |
| 255 ; EEPROM Bank1 | |
| 256 ; Byte 5: =0xAA -> reload time and date in "restart:" | |
| 257 ; Byte 6-11: YYMMDDHHMMSS | |
| 258 movlw .1 | |
| 259 movwf EEADRH | |
| 260 movff year,EEDATA | |
| 261 write_int_eeprom d'6' | |
| 262 movff month,EEDATA | |
| 263 write_int_eeprom d'7' | |
| 264 movff day,EEDATA | |
| 265 write_int_eeprom d'8' | |
| 266 movff hours,EEDATA | |
| 267 write_int_eeprom d'9' | |
| 268 movff mins,EEDATA | |
| 269 write_int_eeprom d'10' | |
| 270 movff secs,EEDATA | |
| 271 write_int_eeprom d'11' | |
| 272 movlw 0xAA | |
| 273 movwf EEDATA | |
| 274 write_int_eeprom d'5' ; Set flag | |
| 275 clrf EEADRH | |
| 253 DISPLAYTEXTH d'303' ; Yes, "Please wait!" | 276 DISPLAYTEXTH d'303' ; Yes, "Please wait!" |
| 254 clrf INTCON ; Interrupts disabled | 277 clrf INTCON ; Interrupts disabled |
| 255 bcf PIR1,RCIF ; clear flag | 278 bcf PIR1,RCIF ; clear flag |
| 256 goto 0x17F56 ; Enter straight into bootloader. Good luck! | 279 goto 0x17F56 ; Enter straight into bootloader. Good luck! |
