Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/menu_reset.asm @ 350:7250ca7c8d24 64kByte Logbook
64kByte logbook (Still incompatible to existing PC software)
author | heinrichsweikamp |
---|---|
date | Tue, 31 May 2011 19:43:29 +0200 |
parents | 2144f19fa1eb |
children | 544a96faa9f3 |
comparison
equal
deleted
inserted
replaced
349:ed137d66ac65 | 350:7250ca7c8d24 |
---|---|
454 | 454 |
455 reset_external_eeprom: ; deletes complete external eeprom! | 455 reset_external_eeprom: ; deletes complete external eeprom! |
456 clrf eeprom_address+0 | 456 clrf eeprom_address+0 |
457 clrf eeprom_address+1 | 457 clrf eeprom_address+1 |
458 | 458 |
459 movlw d'2' | 459 movlw d'4' |
460 movwf temp3 | 460 movwf temp3 |
461 reset_eeprom02: | 461 reset_eeprom02: |
462 clrf temp4 | 462 clrf temp4 |
463 reset_eeprom01: | 463 reset_eeprom01: |
464 movlw d'64' | 464 movlw d'64' |
474 call WaitMSSP | 474 call WaitMSSP |
475 WAITMS d'7' | 475 WAITMS d'7' |
476 decfsz temp4,F | 476 decfsz temp4,F |
477 bra reset_eeprom01 ; do this 256 times | 477 bra reset_eeprom01 ; do this 256 times |
478 decfsz temp3,F | 478 decfsz temp3,F |
479 bra reset_eeprom02 ; and this all 2 times -> 512 *64Bytes = 32KB | 479 bra reset_eeprom02 ; and this all 4 times -> 1024 *64Bytes = 64KB |
480 | 480 |
481 bcf eeprom_blockwrite ; clear blockwrite flag | 481 bcf eeprom_blockwrite ; clear blockwrite flag |
482 | 482 |
483 clrf eeprom_address+0 | 483 clrf eeprom_address+0 |
484 clrf eeprom_address+1 | 484 clrf eeprom_address+1 |