Solution:
| |
Firstly, it should be noted that some chip types do not have any EEPROM. Then, for those chips that do have EEPROM, the registers that access it varies. For example, the 16F84 uses registers 08 and 09 whereas the 16F872 uses registers 0C and 0D.
This means that listing 2.12 on page 25 would not work. To make it work, change lines 8 and 9 from:
BCF 0x08, 7
BSF 0x08, 2
to
BCF 0x0C, 7
BSF 0x0C, 2
Similar errors exist in listing 2.14
Line 5 should read MOVF 0x21, W
Lines 23 and 25 should refer to register 0x0C instead of 0x08.
| |