The following test code works OK first time (after programmer erases memory), but on the second run it does not erase the block specified.
The chip under testing is the 16F886, 8 words block size.
Results on first run:Code:clear erasecode #1e00 hserout ["1st test",13,10] for temp=$1e00 to $1e07 readcode temp,code hserout [#temp," : ",#code,13,10] next temp hserout [13,10,"2nd test",13,10] for temp=$1e00 to $1e07 writecode temp,temp next temp for temp=$1e00 to $1e07 readcode temp,code hserout [#temp," : ",#code,13,10] next temp hserout [13,10,"3rd test",13,10] for temp=$1e00 to $1e07 writecode temp,12345 next temp for temp=$1e00 to $1e07 readcode temp,code hserout [#temp," : ",#code,13,10] next temp stop
Results on second run:Code:1st test 7680 : 16383 7681 : 16383 7682 : 16383 7683 : 16383 7684 : 16383 7685 : 16383 7686 : 16383 7687 : 16383 2nd test 7680 : 7680 7681 : 7681 7682 : 7682 7683 : 7683 7684 : 7684 7685 : 7685 7686 : 7686 7687 : 7687 3rd test 7680 : 12345 7681 : 12345 7682 : 12345 7683 : 12345 7684 : 12345 7685 : 12345 7686 : 12345 7687 : 12345
Why Erasecode does not erase the block?Code:1st test 7680 : 12345 7681 : 12345 7682 : 12345 7683 : 12345 7684 : 12345 7685 : 12345 7686 : 12345 7687 : 12345 2nd test 7680 : 7680 7681 : 7681 7682 : 7682 7683 : 7683 7684 : 7684 7685 : 7685 7686 : 7686 7687 : 7687 3rd test 7680 : 12345 7681 : 12345 7682 : 12345 7683 : 12345 7684 : 12345 7685 : 12345 7686 : 12345 7687 : 12345
Ioannis




Bookmarks