************************************************************************ ************************************************************************ ** ** ** Application notes for MICROCHIP Microcontrollers ** ** (Informal Document) ** ** ** ** To find the application notes for your device search for the ** ** 'core' part name. As an example using the PIC16C622A 18 pin SOIC ** ** you would search on '16C622' ** ** ** ************************************************************************ ************************************************************************ **************************************************************************** PIC16C620 PIC16C620A ----------- Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 01FF hex flash cells CUSTOMER ID 2000 - 2003 hex flash cells CONFIG. WORD 2007 hex flash cell Data for the eprom portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Example: 3A12 hex, 1C45 hex, 0A22 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1bbb bbbb" where "bbbb" is ID information. The Configuration Word should be included in your hex file. Always check the location 2007 hex (in words) if the Configuration word is present. Bits 4 and 5 of the configuration word are the security fuses. The options are as follows: 00 All memory is code protected. 11 Code protection off. On devices that use configuration bits 8-13 for security, they are set by the algorithm according to what bits 4 and 5 are set to by the user. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured using the value from the word at address 2007 hex in the Programmer User's RAM. Without setting the Security Option the device will not be secured. When the device is ALL secured, only the Customer IDs and the Configuration Word are readable. VERIFY,BLANK-CHECK and PROGRAM DEVICE operations are not allowed on secured devices. At the end of the programming, even if the Security Option in the PROGRAM DEVICE is set to 'Y', the check sum is calculated from the whole array (SUM[0x0000 : 0x01FF] + CONFIG_WORD & 0x3F7F). The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices (CP1/CP0 = 11): CHECKSUM = SUM[0x0000 : 0x01FF] + CONFIG_WORD & 0x3F7F The blank unsecured devices have checksum = 0x3D7F. The checksum formula for fully protected devices (CP1/CP0 = 00): CHECKSUM = CONFIG_WORD & 0x3F7F + SUM[IDs] Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). NOTE: On some windowed parts it is hard to erase security bits in the configuration register. Do not secure these parts if reusability is required. ************************************************************************ PIC16C621A PIC16C621 PIC16C712 PIC16LC621_N ------------ Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 03FF hex CUSTOMER ID 2000 - 2003 hex CONFIG. WORD 2007 hex Data for the eprom portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Example: 3A12 hex, 1C45 hex, 0A22 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1bbb bbbb" where "bbbb" is ID information. The Configuration Word should be included in your hex file. Always check the location 2007 hex (in words) if the Configuration word is present. Bits 4 and 5 of the configuration word are the security fuses. The options are as follows: 00 All memory is code protected. 10 Upper 1/2 of program memory code protected. 11 Code protection off. On devices that use configuration bits 8-13 for security, they are set by the algorithm according to what bits 4 and 5 are set to by the user. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured using the value from the word at address 2007 hex in the Programmer User's RAM. Without setting the Security Option the device will not be secured. When the device is 1/2 secured, the User EPROM from 0000 hex to 01FF hex, the Customer IDs and the Configuration Word are readable. When the device is ALL secured, only the Customer IDs and the Configuration Word are readable. VERIFY,BLANK-CHECK and PROGRAM DEVICE operations are not allowed on secured devices. At the end of the programming, even if the Security Option in the PROGRAM DEVICE is set to 'Y', the check sum is calculated from the whole array (SUM[0x0000 : 0x03FF] + CONFIG_WORD & 0x3F7F). The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x0000 : 0x03FF] + CONFIG_WORD & 0x3F7F The blank unsecured devices have checksum = 0x3B7F The checksum formula for ALL protected devices: CHECKSUM = CONFIG_WORD & 0x3F7F + SUM[IDs] The checksum formula for 1/2 protected devices: CHECKSUM = SUM[0x0000 : 0x01FF] + CONFIG_WORD & 0x3F7F + SUM[IDs] For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). NOTE: On some windowed parts it is hard to erase security bits in the configuration register. Do not secure these parts if reusability is required. NOTE: Some PIC16C621A devices have bits #0 and #1 preprogrammed from the factory. ************************************************************************* PIC16C558 PIC16LC558_N -------------- Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 07FF hex CUSTOMER ID 2000 - 2003 hex CONFIG. WORD 2007 hex Data for the eprom portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Example: 3A12 hex, 1C45 hex, 0A22 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1bbb bbbb" where "bbbb" is ID information. The Configuration Word should be included in your hex file. Always check the location 2007 hex (in words) if the Configuration Word is present. Bits 4 and 5 of the configuration word are the security fuses. The options are as follows: 00 All memory is code protected. 01 Upper 3/4 of program memory code protected. 10 Upper 1/2 of program memory code protected. 11 Code protection off. On devices that use configuration bits 8-13 for security, they are set by the algorithm according to what bits 4 and 5 are set to by the user. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured using the value from the word at address 2007 hex in the Programmer User's RAM. Without setting the Security Option the device will not be secured. When the device is 1/2 secured, the User EPROM from 0000 hex to 03FF hex, the Customer IDs and the Configuration Word are readable. When the device is 3/4 secured, the User EPROM from 0000 hex to 01FF hex, the Customer IDs and the Configuration Word are readable. When the device is ALL secured, only the Customer IDs and the Configuration Word are readable. VERIFY,BLANK-CHECK and PROGRAM DEVICE operations are not allowed on secured devices. At the end of the programming, even if the Security Option in the PROGRAM DEVICE is set to 'Y', the check sum is calculated from the whole array (SUM[0x0000 : 0x07FF] + CONFIG_WORD & 0x3F3F). The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x0000 : 0x07FF] + CONFIG_WORD & 0x3F3F The blank unsecured devices have checksum = 0x373F The checksum formula for ALL protected devices: CHECKSUM = CONFIG_WORD & 0x3F3F + SUM[IDs] The checksum formula for 3/4 protected devices: CHECKSUM = SUM[0x0000 : 0x01FF] + CONFIG_WORD & 0x3F3F + SUM[IDs] The checksum formula for 1/2 protected devices: CHECKSUM = SUM[0x0000 : 0x03FF] + CONFIG_WORD & 0x3F3F + SUM[IDs] For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). NOTE: On some windowed parts it is hard to erase security bits in the configuration register. Do not secure these parts if reusability is required. ************************************************************************ PIC16C554 ---------- Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 01FF hex CUSTOMER ID 2000 - 2003 hex CONFIG. WORD 2007 hex Data for the eprom portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Example: 3A12 hex, 1C45 hex, 0A22 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1bbb bbbb" where "bbbb" is ID information. The Configuration Word should be included in your hex file. Always check the location 2007 hex (in words) if the Configuration Word is present. Bits 4 and 5 of the configuration word are the security fuses. The options are as follows: 00 All memory is code protected. 11 Code protection off. On devices that use configuration bits 8-13 for security, they are set by the algorithm according to what bits 4 and 5 are set to by the user. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured using the value from the word at address 2007 hex in the Programmer User's RAM. Without setting the Security Option the device will not be secured. When the device is ALL secured, only the Customer IDs and the Configuration Word are readable. VERIFY,BLANK-CHECK and PROGRAM DEVICE operations are not allowed on secured devices. At the end of the programming, even if the Security Option in the PROGRAM DEVICE is set to 'Y', the check sum is calculated from the whole array (SUM[0x0000 : 0x01FF] + CONFIG_WORD & 0x3F3F). The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x0000 : 0x01FF] + CONFIG_WORD & 0x3F3F The blank unsecured devices have checksum = 0x3D3F The checksum formula for ALL protected devices: CHECKSUM = CONFIG_WORD & 0x3F3F + SUM[IDs] For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). NOTE: On some windowed parts it is hard to erase security bits in the configuration register. Do not secure these parts if reusability is required. **************************************************************************** PIC16C65A_N PIC16C65B_N PIC16C65B PIC16C74A_N PIC16C74B_N PIC16C63 PIC16C63A PIC16C73B_N PIC16C73A_N PIC16LC63_N PIC16LC63A PIC16LC65B_N PIC16LC74A_N PIC16LC74B PIC16LC73A_N -------------- Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 0FFF hex CUSTOMER ID 2000 - 2003 hex CONFIG. WORD 2007 hex Data for the eprom portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Example: 3A12 hex, 1C45 hex, 0A22 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1bbb bbbb" where "bbbb" is ID information. The Configuration Word should be included in your hex file. Always check the location 2007 hex (in words) if the Configuration word is present. Bits 4 and 5 of the configuration word are the security fuses. The options are as follows: Bit 5, Bit 4 0 0 All memory is code protected. 0 1 Upper 3/4 of program memory code protected. 1 0 Upper 1/2 of program memory code protected. 1 1 Code protection off. An example for protection of a device with the Upper 1/2 of program memory code protected would be(assuming no other configuration bits are set): 3FEF hex @ location 2007 hex in the User RAM An example for protection of a device with the Upper 3/4 of program memory code protected would be(assuming no other configuration bits are set): 3FDF hex @ location 2007 hex in the User RAM On devices that use configuration bits 8-13 for security, they are set by the algorithm according to what bits 4 and 5 are set to by the user. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured using the value from the word at address 2007 hex in the Programmer User's RAM. Without setting the Security Option the device will not be secured. When the device is 1/2 secured, the User EPROM from 0000 hex to 07FF hex, the Customer IDs and the Configuration Word are readable. When the device is 3/4 secured, the User EPROM from 0000 hex to 03FF hex, the Customer IDs and the Configuration Word are readable. When the device is ALL secured, only the Customer IDs and the Configuration Word are readable. VERIFY,BLANK-CHECK and PROGRAM DEVICE operations are not allowed on secured devices. At the end of the programming, even if the Security Option in the PROGRAM DEVICE is set to 'Y', the check sum is calculated from the whole array (SUM[0x0000 : 0x0FFF] + CONFIG_WORD & 0x3F7F). The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x0000 : 0x0FFF] + CONFIG_WORD & 0x3F7F The blank unsecured devices have checksum = 0x2F7F The checksum formula for ALL protected devices: CHECKSUM = CONFIG_WORD & 0x3F7F + SUM[IDs] The checksum formula for 3/4 protected devices: CHECKSUM = SUM[0x0000 : 0x03FF] + CONFIG_WORD & 0x3F7F + SUM[IDs] The checksum formula for 1/2 protected devices: CHECKSUM = SUM[0x0000 : 0x07FF] + CONFIG_WORD & 0x3F7F + SUM[IDs] For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). NOTE: On some windowed parts it is hard to erase security bits in the configuration register. Do not secure these parts if reusability is required. ************************************************************************ PIC16C66_N PIC16C67_N PIC16C76_N PIC16C77_N PIC16LC67_N ----------- Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 1FFF hex CUSTOMER ID 2000 - 2003 hex CONFIG. WORD 2007 hex Data for the eprom portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Example: 3A12 hex, 1C45 hex, 0A22 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1bbb bbbb" where "bbbb" is ID information. The Configuration Word should be included in your hex file. Always check the location 2007 hex (in words) if the Configuration word is present. Bits 4 and 5 of the configuration word are the security fuses. The options are as follows: 00 All memory is code protected. 01 Upper 3/4 of program memory code protected. 10 Upper 1/2 of program memory code protected. 11 Code protection off. On devices that use configuration bits 8-13 for security, they are set by the algorithm according to what bits 4 and 5 are set to by the user. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured using the value from the word at address 2007 hex in the Programmer User's RAM. Without setting the Security Option the device will not be secured. When the device is 1/2 secured, the User EPROM from 0000 hex to 0FFF hex, the Customer IDs and the Configuration Word are readable. When the device is 3/4 secured, the User EPROM from 0000 hex to 07FF hex, the Customer IDs and the Configuration Word are readable. When the device is ALL secured, only the Customer IDs and the Configuration Word are readable. VERIFY,BLANK-CHECK and PROGRAM DEVICE operations are not allowed on secured devices. At the end of the programming, even if the Security Option in the PROGRAM DEVICE is set to 'Y', the check sum is calculated from the whole array (SUM[0x0000 : 0x01FFF] + CONFIG_WORD & 0x3F7F). The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x0000 : 0x1FFF] + CONFIG_WORD & 0x3F7F The blank unsecured devices have checksum = 0x1F7F The checksum formula for ALL protected devices: CHECKSUM = CONFIG_WORD & 0x3F7F + SUM[IDs] The checksum formula for 3/4 protected devices: CHECKSUM = SUM[0x0000 : 0x07FF] + CONFIG_WORD & 0x3F7F + SUM[IDs] The checksum formula for 1/2 protected devices: CHECKSUM = SUM[0x0000 : 0x0FFF] + CONFIG_WORD & 0x3F7F + SUM[IDs] For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). NOTE: On some windowed parts it is hard to erase security bits in the configuration register. Do not secure these parts if reusability is required. ************************************************************************ PIC16C622 PIC16C622A PIC16C622A_N PIC16C62A_N PIC16C62B_N PIC16C62B PIC16C64A_N PIC16C72A_N PIC16C72 PIC16C716 PIC16C432 PIC16LC622_N PIC16LC72_N PIC16LC72A PIC16LC64A_N --------------- Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 07FF hex CUSTOMER ID 2000 - 2003 hex CONFIG. WORD 2007 hex Data for the eprom portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Example: 3A12 hex, 1C45 hex, 0A22 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1bbb bbbb" where "bbbb" is ID information. The Configuration Word should be included in your hex file. Always check the location 2007 hex (in words) if the Configuration word is present. Bits 4 and 5 of the configuration word are the security fuses. The options are as follows: 00 All memory is code protected. 01 Upper 3/4 of program memory code protected. 10 Upper 1/2 of program memory code protected. 11 Code protection off. On devices that use configuration bits 8-13 for security, they are set by the algorithm according to what bits 4 and 5 are set to by the user. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured using the value from the word at address 2007 hex in the Programmer User's RAM. Without setting the Security Option the device will not be secured. When the device is 1/2 secured, the User EPROM from 0000 hex to 03FF hex, the Customer IDs and the Configuration Word are readable. When the device is 3/4 secured, the User EPROM from 0000 hex to 01FF hex, the Customer IDs and the Configuration Word are readable. When the device is ALL secured, only the Customer IDs and the Configuration Word are readable. VERIFY,BLANK-CHECK and PROGRAM DEVICE operations are not allowed on secured devices. At the end of the programming, even if the Security Option in the PROGRAM DEVICE is set to 'Y', the check sum is calculated from the whole array (SUM[0x0000 : 0x07FF] + CONFIG_WORD & 0x3F7F). The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x0000 : 0x07FF] + CONFIG_WORD & 0x3F7F The blank unsecured devices have checksum = 0x377F The checksum formula for ALL protected devices: CHECKSUM = CONFIG_WORD & 0x3F7F + SUM[IDs] The checksum formula for 3/4 protected devices: CHECKSUM = SUM[0x0000 : 0x01FF] + CONFIG_WORD & 0x3F7F + SUM[IDs] The checksum formula for 1/2 protected devices: CHECKSUM = SUM[0x0000 : 0x03FF] + CONFIG_WORD & 0x3F7F + SUM[IDs] For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). NOTE: On some windowed parts it is hard to erase security bits in the configuration register. Do not secure these parts if reusability is required. NOTE: Some PIC16C622A devices have bits #0 and #1 preprogrammed from the factory. ************************************************************************ PIC16C923 PIC16C924 PIC16LC924 --------- Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 0FFF hex CUSTOMER ID 2000 - 2003 hex CONFIG. WORD 2007 hex Data for the eprom portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Example: 3A12 hex, 1C45 hex, 0A22 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1bbb bbbb" where "bbbb" is ID information. The Configuration Word should be included in your hex file. Always check the location 2007 hex (in words) if the Configuration Word is present. Bits 4 and 5 of the configuration word are the security fuses. The options are as follows: 00 All memory is code protected. 01 Upper 3/4 of program memory code protected. 10 Upper 1/2 of program memory code protected. 11 Code protection off. On devices that use configuration bits 8-13 for security, they are set by the algorithm according to what bits 4 and 5 are set to by the user. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured using the value from the word at address 2007 hex in the Programmer User's RAM. Without setting the Security Option the device will not be secured. When the device is 1/2 secured, the User EPROM from 0000 hex to 03FF hex, the Customer IDs and the Configuration Word are readable. When the device is 3/4 secured, the User EPROM from 0000 hex to 01FF hex, the Customer IDs and the Configuration Word are readable. When the device is ALL secured, only the Customer IDs and the Configuration Word are readable. VERIFY,BLANK-CHECK and PROGRAM DEVICE operations are not allowed on secured devices. At the end of the programming, even if the Security Option in the PROGRAM DEVICE is set to 'Y', the check sum is calculated from the whole array (SUM[0x0000 : 0x0FFF] + CONFIG_WORD & 0x3F3F). The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x0000 : 0x0FFF] + CONFIG_WORD & 0x3F3F The blank unsecured devices have checksum = 0x2F3F The checksum formula for ALL protected devices: CHECKSUM = CONFIG_WORD & 0x3F3F + SUM[IDs] The checksum formula for 3/4 protected devices: CHECKSUM = SUM[0x0000 : 0x03FF] + CONFIG_WORD & 0x3F3F + SUM[IDs] The checksum formula for 1/2 protected devices: CHECKSUM = SUM[0x0000 : 0x07FF] + CONFIG_WORD & 0x3F3F + SUM[IDs] For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). NOTE: On some windowed parts it is hard to erase security bits in the configuration register. Do not secure these parts if reusability is required. ******************************************************************************* PIC16F73 ----------------- PIC16LF73 ----------------- PIC16F74 ----------------- PIC16LF74 ----------------- Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 000F hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 0FFF flash cell CUSTOMER ID 2000 - 2003 flash cell CONFIG. WORD 2007 flash cell Data for the flash portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Example: 3A12 hex, 1C45 hex, 0A22 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1000 bbbb" where "bbbb" is ID information. Check if the Configuration Word is included in your hex file. This can be done by downloading the data file into the programmer and checking the location 2007 hex (in words). To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After the programming, the device with this option enabled is secured. The protection level depends on values of CP0 bit in the Configuration Word at location 2007 hex (in words). Without setting the Security Option and proper setting of CP0 bit in the Configuration word, the device will not be secured. Positions of Protection (Security) bits in the Configuration word: bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ------------------------------------------------------------------------ '0' '0' '0' '0' '0' '0' '0' '0' '0' D '0' CP0 D D D D CP0 is the protection bit. D is a data bit as FOSC0, FOSC1,... CP0 is the protection bit. It can be either set to 0 or 1. If protection bit is 0, code is protected. VERIFY and BLANK-CHECK operations are not allowed on secured devices. The customer IDs and the Configuration Word are always readable. Even on secured devices. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. At the end of the programming, even if the Security Option in the PROGRAM DEVICE is set to 'Y', the check sum is calculated from the whole array (SUM[0x0000 : 0x0FFF] + CONFIG_WORD & 0x005F). The checksum formula for unprotected devices (CP0 = 1): CHECKSUM = SUM[0x0000 : 0x0FFF] + CONFIG_WORD & 0x005F The blank unsecured devices have checksum = 0xF05F The checksum formula for fully protected devices (CP0 = 0): CHECKSUM = CONFIG_WORD & 0x005F + SUM[IDs] The blank ALL secured devices have checksum = 0x004E. (Configuration word is 0x3FEF) Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). For more check the manufacturer's specifications. **************************************************************************** PIC16F76/PIC16F77 ----------------- Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 000F hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 1FFF flash cell CUSTOMER ID 2000 - 2003 flash cell CONFIG. WORD 2007 flash cell Data for the flash portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Example: 3A12 hex, 1C45 hex, 0A22 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1000 bbbb" where "bbbb" is ID information. Check if the Configuration Word is included in your hex file. This can be done by downloading the data file into the programmer and checking the location 2007 hex (in words). To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After the programming, the device with this option enabled is secured. The protection level depends on values of CP0 bit in the Configuration Word at location 2007 hex (in words). Without setting the Security Option and proper setting of CP0 bit in the Configuration word, the device will not be secured. Positions of Protection (Security) bits in the Configuration word: bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ------------------------------------------------------------------------ '0' '0' '0' '0' '0' '0' '0' '0' '0' D '0' CP0 D D D D CP0 is the protection bit. D is a data bit as FOSC0, FOSC1,... CP0 is the protection bit. It can be either set to 0 or 1. If protection bit is 0, code is protected. VERIFY and BLANK-CHECK operations are not allowed on secured devices. The customer IDs and the Configuration Word are always readable. Even on secured devices. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. At the end of the programming, even if the Security Option in the PROGRAM DEVICE is set to 'Y', the check sum is calculated from the whole array (SUM[0x0000 : 0x1FFF] + CONFIG_WORD & 0x005F). The checksum formula for unprotected devices (CP0 = 1): CHECKSUM = SUM[0x0000 : 0x1FFF] + CONFIG_WORD & 0x005F The blank unsecured devices have checksum = 0xE05F The checksum formula for fully protected devices (CP0 = 0): CHECKSUM = CONFIG_WORD & 0x005F + SUM[IDs] The blank ALL secured devices have checksum = 0x004E. (Configuration word is 0x3FEF) Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). For more check the manufacturer's specifications. **************************************************************************** PIC16F818 ------------ PIC16LF818 ------------ PIC16F819 ------------ PIC16LF819 ------------ Blank state of each Word of User Program Memory: 3FFF hex Blank state of each Word of ID Memory: 3FFF hex Blank state of the Configuration Word: 3FFF hex Blank state of each Word of EEPROM Data Memory: 00FF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: User Program Memory Address Range: 0000 -> 03FF hex (PIC16F818) User Program Memory Address Range: 0000 -> 07FF hex (PIC16F819) ID Memory Address Range: 2000 -> 2003 hex Configuration Word Address Range: 2007 hex EEPROM Data Memory Address Range: 2100 -> 217F hex (PIC16F818) EEPROM Data Memory Address Range: 2100 -> 21FF hex (PIC16F819) Data for the flash portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Examples: 3A12 hex, 1C45 hex, 0A22 hex Data for the EEPROM portion of the memory (data memory) in the User's RAM should have the format: 00000000bbbbbbbb binary where 'b' is data bit. Bits from #8 to #15 should be '0's. Examples: 0012 hex, 00A1 hex, 00F1 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For this reason Microchip recommends that the ID location data be written as "0011 1111 1000 bbbb" where "bbbb" is the ID data. If the customer's data file does not contain EEPROM data, then the data programmed into the EEPROM will be what ever the data is that is already in the Programmer's User RAM at address locations: 2100 hex -> 217F hex To keep the EEPROM blank, fill locations 2100h to 217Fh (PIC16F818) or locations 2100h to 21FFh (PIC16F819) in the Programmer User RAM with 00FF hex before the programming. Check if the Configuration Word is included in your hex file. This can be done by downloading the data file into the programmer and checking the Programmer's User RAM at address locations 2007 hex. To secure the "User Program Memory" in the device, enable the "Program security fuse 1" flag. To secure the "EEPROM Data Memory" in the device, enable the "Program security fuse 2" flag. The Verfy, Blank Check, and Illegal Bit Check operations are not allowed on secured devices. The customer IDs(ID Memory) and the Configuration Word are always readable, regarless of the security set on the device. The checksum is calculated by using Microchip's CheckSum scheme: The checksum formula for Un-Protected Devices(PIC16F819): CHECKSUM = SUM[0x0000 : 0x07FF] + (Configuration_Word & 0x3FFF) The blank unsecured devices have checksum = 0x37FF The checksum formula for Reading a Protected Device(PIC16F819): CHECKSUM = (Configuration_Word & 0x3FFF) + SUM[IDs] The secured device with Erased State data checksum = 0x1EFE Please see the manufacturer's specifications for further information regarding Microchip's CheckSum scheme. Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting either "Intel Intellec 8/MDS translator (foramt code 83)" or Intel Hex 32(format code 99). For futher device specific information please consult the manufacturer's data sheet and/or programming specifications. **************************************************************************** PIC16F870/PIC16F871/PIC16F872/PIC16LF870 ---------------------------------------- Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 07FF hex flash cells CUSTOMER ID 2000 - 2003 hex flash cells CONFIG. WORD 2007 hex flash cell EEPROM 2100 - 213F hex EEPROM cells Data for the flash portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Example: 3A12 hex, 1C45 hex, 0A22 hex Data for the EEPROM portion of the memory (data memory) in the User's RAM should have format: 00000000bbbbbbbb binary where 'b' is data bit. Bits from #8 to #15 should be '0's. Example: 0012 hex, 00A1 hex, 00F1 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1000 bbbb" where "bbbb" is ID information. If the customer's data file does not contain EEPROM data, the EEPROM will be programmed with the random data from locations 2100h to 213Fh in the Programmer User RAM. It can be anything. To keep the EEPROM blank, fill locations 2100h to 213Fh in the Programmer User RAM with 00FF hex before the programming. Check if the Configuration Word is included in your hex file. This can be done by downloading the data file into the programmer and checking the location 2007 hex (in words). To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After the programming, the device with this option enabled is secured. The protection level depends on values of CP0, CP1 and CPD bits in the Configuration Word at location 2007 hex (in words). Without setting the Security Option and proper setting of CP0, CP1 and CPD bits in the Configuration word,the device will not be secured. Positions of Protection (Security) bits in the Configuration word: bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ------------------------------------------------------------------------ '0' '0' CP1 CP0 D '1' D CPD D D CP1 CP0 D D D D CP1, CP0, CPD are the protection bits. '1' is the reserved bit. Reads as '1'. D is a data bit as FOSC0, FOSC1,... CP1 and CP0 are the protection bits. These bits can be either set to 00 or 11. If protection bits are set to anything other than this, following error is flashed: "Invalid security bits in config. word". VERIFY and BLANK-CHECK operations are not allowed on secured devices. The customer IDs and the Configuration Word are always readable. Even on secured devices. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. At the end of the programming, even if the Security Option in the PROGRAM DEVICE is set to 'Y', the check sum is calculated from the whole array (SUM[0x0000 : 0x07FF] + CONFIG_WORD & 0x3BFF). If bits CP0, CP1 or CPD in the Configuration Word are set to '0's and the Security Option in the PROGRAM DEVICE is set to 'N', those bits are added to the checksum as '1's, not as '0's. That is correct because the device is not protected and those bits are read as '1's. The checksum formula for unprotected devices (CP1/CP0 = 11): CHECKSUM = SUM[0x0000 : 0x07FF] + CONFIG_WORD & 0x3BFF The blank unsecured devices have checksum = 0x33FF The checksum formula for fully protected devices (CP1/CP0 = 00): CHECKSUM = CONFIG_WORD & 0x3BFF + SUM[IDs] The blank ALL secured devices have checksum = 0x0BCE. (Configuration word is 0x0FCF) The blank check is not performed on the EEPROM (data memory). Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). For more check the manufacturer's specifications. **************************************************************************** PIC16F873/PIC16LF873/PIC16F874/PIC16LF874 ------------------------------ Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 0FFF hex flash cells CUSTOMER ID 2000 - 2003 hex flash cells CONFIG. WORD 2007 hex flash cell EEPROM 2100 - 217F hex EEPROM cells Data for the flash portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Example: 3A12 hex, 1C45 hex, 0A22 hex Data for the EEPROM portion of the memory (data memory) in the User's RAM should have format: 00000000bbbbbbbb binary where 'b' is data bit. Bits from #8 to #15 should be '0's. Example: 0012 hex, 00A1 hex, 00F1 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1000 bbbb" where "bbbb" is ID information. If the customer's data file does not contain EEPROM data, the EEPROM will be programmed with the random data from locations 2100h to 217Fh in the Programmer User RAM. It can be anything. To keep the EEPROM blank, fill locations 2100h to 217Fh in the Programmer User RAM with 00FF hex before the programming. Check if the Configuration Word is included in your hex file. This can be done by downloading the data file into the programmer and checking the location 2007 hex (in words). To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After the programming, the device with this option enabled is secured. The protection level depends on values of CP0, CP1 and CPD bits in the Configuration Word at location 2007 hex (in words). Without setting the Security Option and proper setting of CP0, CP1 and CPD bits in the Configuration word,the device will not be secured. Positions of Protection (Security) bits in the Configuration word: bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ------------------------------------------------------------------------ '0' '0' CP1 CP0 D '1' D CPD D D CP1 CP0 D D D D CP1, CP0, CPD are the protection bits. '1' is the reserved bit. Reads as '1'. D is a data bit as FOSC0, FOSC1,... VERIFY and BLANK-CHECK operations are not allowed on secured devices. The customer IDs and the Configuration Word are always readable. Even on secured devices. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. At the end of the programming, even if the Security Option in the PROGRAM DEVICE is set to 'Y', the check sum is calculated from the whole array (SUM[0x0000 : 0x0FFF] + CONFIG_WORD & 0x3BFF). If bits CP0, CP1 or CPD in the Configuration Word are set to '0's and the Security Option in the PROGRAM DEVICE is set to 'N', those bits are added to the checksum as '1's, not as '0's. That is correct because the device is not protected and those bits are read as '1's. The checksum formula for unprotected devices (CP1/CP0 = 11): CHECKSUM = SUM[0x0000 : 0x0FFF] + CONFIG_WORD & 0x3BFF The blank unsecured devices have checksum = 0x2BFF The checksum formula for fully protected devices (CP1/CP0 = 00): CHECKSUM = CONFIG_WORD & 0x3BFF + SUM[IDs] The blank ALL secured devices have checksum = 0x0BCE. (Configuration word is 0x0FCF) The checksum formula for protected devices with CP1/CP0 = 10 : CHECKSUM = SUM[0x0000 : 0x0EFF] + CONFIG_WORD & 0x3BFF + SUM[IDs] The blank secured devices with CP1/CP0 = 10 have checksum = 0x1CEE. (Configuration word is 0x2FEF) The checksum formula for protected devices with CP1/CP0 = 01 : CHECKSUM = SUM[0x0000 : 0x07FF] + CONFIG_WORD & 0x3BFF + SUM[IDs] The blank secured devices with CP1/CP0 = 01 have checksum = 0x13DE. (Configuration word is 0x1FDF) The blank check is not performed on the EEPROM (data memory). Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). For more check the manufacturer's specifications. **************************************************************************** PIC16F873A ------------ PIC16LF873A ------------ PIC16F874A ------------ PIC16LF874A ------------ Blank state of each Word of User Program Memory: 3FFF hex Blank state of each Word of ID Memory: 3FFF hex Blank state of the Configuration Word: 3FFF hex Blank state of each Word of EEPROM Data Memory: 00FF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: User Program Memory Address Range: 0000 -> 0FFF hex ID Memory Address Range: 2000 -> 2003 hex Configuration Word Address Range: 2007 hex EEPROM Data Memory Address Range: 2100 -> 217F hex Data for the flash portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Examples: 3A12 hex, 1C45 hex, 0A22 hex Data for the EEPROM portion of the memory (data memory) in the User's RAM should have the format: 00000000bbbbbbbb binary where 'b' is data bit. Bits from #8 to #15 should be '0's. Examples: 0012 hex, 00A1 hex, 00F1 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For this reason Microchip recommends that the ID location data be written as "0011 1111 1000 bbbb" where "bbbb" is the ID data. If the customer's data file does not contain EEPROM data, then the data programmed into the EEPROM will be what ever the data is that is already in the Programmer's User RAM at address locations: 2100 hex -> 217F hex To keep the EEPROM blank, fill locations 2100h to 217Fh in the Programmer User RAM with 00FF hex before the programming. Check if the Configuration Word is included in your hex file. This can be done by downloading the data file into the programmer and checking the Programmer's User RAM at address locations 2007 hex. To secure the "User Program Memory" in the device, enable the "Program security fuse 1" flag. To secure the "EEPROM Data Memory" in the device, enable the "Program security fuse 2" flag. The Verfy, Blank Check, and Illegal Bit Check operations are not allowed on secured devices. The customer IDs(ID Memory) and the Configuration Word are always readable, regarless of the security set on the device. The checksum is calculated by using Microchip's CheckSum scheme: The checksum formula for Un-Protected Devices: CHECKSUM = SUM[0x0000 : 0x0FFF] + (Configuration_Word & 0x2FCF) The blank unsecured devices have checksum = 0x1FCF The checksum formula for Reading a Protected Device: CHECKSUM = (Configuration_Word & 0x2FCF) + SUM[IDs] The secured device with Erased State data checksum = 0x0ECE Please see the manufacturer's specifications for further information regarding Microchip's CheckSum scheme. Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting either "Intel Intellec 8/MDS translator (foramt code 83)" or Intel Hex 32(format code 99). For futher device specific information please consult the manufacturer's data sheet and/or programming specifications. **************************************************************************** PIC16F876/PIC16F877/PIC16LF877 ------------------------------ Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 1FFF hex flash cells CUSTOMER ID 2000 - 2003 hex flash cells CONFIG. WORD 2007 hex flash cell EEPROM 2100 - 21FF hex EEPROM cells Data for the flash portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Example: 3A12 hex, 1C45 hex, 0A22 hex Data for the EEPROM portion of the memory (data memory) in the User's RAM should have format: 00000000bbbbbbbb binary where 'b' is data bit. Bits from #8 to #15 should be '0's. Example: 0012 hex, 00A1 hex, 00F1 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1000 bbbb" where "bbbb" is ID information. If the customer's data file does not contain EEPROM data, the EEPROM will be programmed with the random data from locations 2100h to 21FFh in the Programmer User RAM. It can be anything. To keep the EEPROM blank, fill locations 2100h to 21FFh in the Programmer User RAM with 00FF hex before the programming. Check if the Configuration Word is included in your hex file. This can be done by downloading the data file into the programmer and checking the location 2007 hex (in words). To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After the programming, the device with this option enabled is secured. The protection level depends on values of CP0, CP1 and CPD bits in the Configuration Word at location 2007 hex (in words). Without setting the Security Option and proper setting of CP0, CP1 and CPD bits in the Configuration word,the device will not be secured. Positions of Protection (Security) bits in the Configuration word: bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ------------------------------------------------------------------------ '0' '0' CP1 CP0 D '1' D CPD D D CP1 CP0 D D D D CP1, CP0, CPD are the protection bits. '1' is the reserved bit. Reads as '1'. D is a data bit as FOSC0, FOSC1,... VERIFY and BLANK-CHECK operations are not allowed on secured devices. The customer IDs and the Configuration Word are always readable. Even on secured devices. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. At the end of the programming, even if the Security Option in the PROGRAM DEVICE is set to 'Y', the check sum is calculated from the whole array (SUM[0x0000 : 0x1FFF] + CONFIG_WORD & 0x3BFF). If bits CP0, CP1 or CPD in the Configuration Word are set to '0's and the Security Option in the PROGRAM DEVICE is set to 'N', those bits are added to the checksum as '1's, not as '0's. That is correct because the device is not protected and those bits are read as '1's. The checksum formula for unprotected devices (CP1/CP0 = 11): CHECKSUM = SUM[0x0000 : 0x1FFF] + CONFIG_WORD & 0x3BFF The blank unsecured devices have checksum = 0x1BFF The checksum formula for fully protected devices (CP1/CP0 = 00): CHECKSUM = CONFIG_WORD & 0x3BFF + SUM[IDs] The blank ALL secured devices have checksum = 0x0BCE. (Configuration word is 0x0FCF) The checksum formula for protected devices with CP1/CP0 = 10 : CHECKSUM = SUM[0x0000 : 0x1EFF] + CONFIG_WORD & 0x3BFF + SUM[IDs] The blank secured devices with CP1/CP0 = 10 have checksum = 0xCEE. (Configuration word is 0x2FEF) The checksum formula for protected devices with CP1/CP0 = 01 : CHECKSUM = SUM[0x0000 : 0x0FFF] + CONFIG_WORD & 0x3BFF + SUM[IDs] The blank secured devices with CP1/CP0 = 01 have checksum = 0xBDE. (Configuration word is 0x1FDF) The blank check is not performed on the EEPROM (data memory). Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). For more check the manufacturer's specifications. **************************************************************************** PIC16F83/PIC16LF83 ------------------ Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 01FF hex flash cells CUSTOMER ID 2000 - 2003 hex flash cells CONFIG. WORD 2007 hex flash cell EEPROM (Data Memory) 2100 - 213F hex EEPROM cells Data for the flash portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Example: 3A12 hex, 1C45 hex, 0A22 hex Data for the EEPROM portion of the memory (data memory) in the User's RAM should have format: 00000000bbbbbbbb binary where 'b' is data bit. Bits from #8 to #15 should be '0's. Example: 0012 hex, 00A1 hex, 00F1 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1000 bbbb" where "bbbb" is ID information. If the customer's data file does not contain EEPROM data, the EEPROM will be programmed with the random data from locations 2100h to 213Fh in the Programmer User RAM. It can be anything. To keep the EEPROM blank, fill locations 2100h to 213Fh in the Programmer User RAM with 00FF hex before the programming. Check if the Configuration Word is included in your hex file. This can be done by downloading the data file into the programmer and checking the location 2007 hex (in words). To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured. Without setting the Security Option the device will not be secured. Only LOAD operation is allowed on secured devices. When the device is secured, the User EPROM from 0000 hex to 03FF hex is scrambled. The customer IDs and the Configuration Word are readable. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x0000 : 0x01FF] + CONFIG_WORD & 0x3FFF The blank unsecured devices have checksum = 0x3DFF The checksum formula for protected devices: CHECKSUM = CONFIG_WORD & 0x3FFF + SUM[IDs] NOTE: The the device is automatically unsecured and erased in the erase routine. The blank check is not performed on the EEPROM (data memory). The EEPROM can be overwritten to any value without erasing. Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). For more check the manufacturer's specifications. ************************************************************************ PIC16F84_N ---------- PIC16F84A ---------- "_N" at the end of the device name means a new algorithm that matches the checksum of the Microchip development tool. The positioning of the IDs and the Configuration words fully satisfies the Microchip specifications. In the case that the user needs compatibility with the old data files, the user should use the algorithm without "_N" at the end of the device name. Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 03FF hex flash cells CUSTOMER ID 2000 - 2003 hex flash cells CONFIG. WORD 2007 hex flash cell EEPROM (Data Memory) 2100 - 213F hex EEPROM cells Data for the flash portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Example: 3A12 hex, 1C45 hex, 0A22 hex Data for the EEPROM portion of the memory (data memory) in the User's RAM should have format: 00000000bbbbbbbb binary where 'b' is data bit. Bits from #8 to #15 should be '0's. Example: 0012 hex, 00A1 hex, 00F1 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1000 bbbb" where "bbbb" is ID information. If the customer's data file does not contain EEPROM data, the EEPROM will be programmed with the random data from locations 2100h to 213Fh in the Programmer User RAM. It can be anything. To keep the EEPROM blank, fill locations 2100h to 213Fh in the Programmer User RAM with 00FF hex before the programming. Check if the Configuration Word is included in your hex file. This can be done by downloading the data file into the programmer and checking the location 2007 hex (in words). To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured. Without setting the Security Option the device will not be secured. Only LOAD operation is allowed on secured devices. When the device is secured, the User EPROM from 0000 hex to 03FF hex is scrambled. The customer IDs and the Configuration Word are readable. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x0000 : 0x03FF] + CONFIG_WORD & 0x3FFF The blank unsecured devices have checksum = 0x3BFF The checksum formula for protected devices: CHECKSUM = CONFIG_WORD & 0x3FFF + SUM[IDs] The blank secured devices have checksum = 0x000E. NOTE: The the device is automatically unsecured and erased in the Erase routine. The blank check is not performed on the EEPROM (data memory). The EEPROM can be overwritten to any value without erasing. Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). For more check the manufacturer's specifications. ***************************************************************************** PIC16F88 ------------ PIC16LF88 ------------ Blank state of each Word of User Program Memory: 3FFF hex Blank state of each Word of ID Memory: 3FFF hex Blank state of the First Configuration Word: 3FFF hex Blank state of the Second Configuration Word: 3FFF hex Blank state of each Word of EEPROM Data Memory: 00FF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: User Program Memory Address Range: 0000 -> 0FFF hex ID Memory Address Range: 2000 -> 2003 hex First Configuration Word Address: 2007 hex Second Configuration Word Address: 2008 hex EEPROM Data Memory Address Range: 2100 -> 21FF hex Data for the flash portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Examples: 3A12 hex, 1C45 hex, 0A22 hex Data for the EEPROM portion of the memory (data memory) in the User's RAM should have the format: 00000000bbbbbbbb binary where 'b' is data bit. Bits from #8 to #15 should be '0's. Examples: 0012 hex, 00A1 hex, 00F1 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For this reason Microchip recommends that the ID location data be written as "0011 1111 1000 bbbb" where "bbbb" is the ID data. If the customer's data file does not contain EEPROM data, then the data programmed into the EEPROM will be what ever the data is that is already in the Programmer's User RAM at address locations: 2100 hex -> 21FF hex To keep the EEPROM blank, fill locations 2100h to 21FFh in the Programmer User RAM with 00FF hex before the programming. Check if the Configuration Word is included in your hex file. This can be done by downloading the data file into the programmer and checking the Programmer's User RAM at address locations 2007 hex. To secure the "User Program Memory" in the device, enable the "Program security fuse 1" flag. To secure the "EEPROM Data Memory" in the device, enable the "Program security fuse 2" flag. The Verfy, Blank Check, and Illegal Bit Check operations are not allowed on secured devices. The customer IDs(ID Memory) and the Configuration Word are always readable, regarless of the security set on the device. The checksum is calculated by using Microchip's CheckSum scheme: The checksum formula for Un-Protected Devices: CHECKSUM = SUM[0x0000 : 0x0FFF] + (First_Configuration_Word & 0x3FFF) + (Second_Configuration_Word & 0x0003) The blank unsecured devices have checksum = 0x3002 The checksum formula for Reading a Protected Device: CHECKSUM = (First_Configuration_Word & 0x3FFF) + (Second_Configuration_Word & 0x0003) + SUM[IDs] The secured device with Erased State data checksum = 0x1F01 Please see the manufacturer's specifications for further information regarding Microchip's CheckSum scheme. Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting either "Intel Intellec 8/MDS translator (foramt code 83)" or Intel Hex 32(format code 99). For futher device specific information please consult the manufacturer's data sheet and/or programming specifications. **************************************************************************** PIC16F777 ------------ PIC16LF777 ------------ PIC16F884 ------------ PIC16LF884 ------------ PIC16F886 ------------ PIC16LF886 ------------ Blank state of each Word of User Program Memory: 3FFF hex Blank state of each Word of ID Memory: 3FFF hex Blank state of the First Configuration Word: 3FFF hex Blank state of the Second Configuration Word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: User Program Memory Address Range: 0000 -> 0FFF hex (PIC16F884) User Program Memory Address Range: 0000 -> 1FFF hex (PIC16F886) User Program Memory Address Range: 0000 -> 1FFF hex (PIC16F777) ID Memory Address Range: 2000 -> 2003 hex First Configuration Word Address: 2007 hex Second Configuration Word Address: 2008 hex EEPROM Data Memory Address Range: 2100 -> 21FF hex Data for the flash portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Examples: 3A12 hex, 1C45 hex, 0A22 hex Data for the EEPROM portion of the memory (data memory) in the User's RAM should have the format: 00000000bbbbbbbb binary where 'b' is data bit. Bits from #8 to #15 should be '0's. Examples: 0012 hex, 00A1 hex, 00F1 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For this reason Microchip recommends that the ID location data be written as "0011 1111 1000 bbbb" where "bbbb" is the ID data. If the customer's data file does not contain EEPROM data, then the data programmed into the EEPROM will be what ever the data is that is already in the Programmer's User RAM at address locations: 2100 hex -> 21FF hex To keep the EEPROM blank, fill locations 2100h to 21FFh in the Programmer User RAM with 00FF hex before the programming. Check if the Configuration Word is included in your hex file. This can be done by downloading the data file into the programmer and checking the Programmer's User RAM at address locations 2007 hex, and address locations 2008 hex. To secure the "User Program Memory" in the device, enable the "Program security fuse 1" flag. The Verfy, Blank Check, and Illegal Bit Check operations are not allowed on secured devices. The customer IDs(ID Memory) and the Configuration Word are always readable, regarless of the security set on the device. The checksum is calculated by using Microchip's CheckSum scheme: The checksum formula for Un-Protected Devices: CHECKSUM = SUM[0x0000 : 0x1FFF] + (First_Configuration_Word & 0x39FF) + (Second_Configuration_Word & 0x0043) The blank unsecured devices have checksum = 0x1A42 The checksum formula for Reading a Protected Device: CHECKSUM = (First_Configuration_Word & 0x39FF) + (Second_Configuration_Word & 0x0043) + SUM[IDs] The secured device with Erased State data checksum = 0x3484 Please see the manufacturer's specifications for further information regarding Microchip's CheckSum scheme. Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting either "Intel Intellec 8/MDS translator (foramt code 83)" or Intel Hex 32(format code 99). For futher device specific information please consult the manufacturer's data sheet and/or programming specifications. **************************************************************************** PIC16C61_N / PIC16C71_N --------------------------- "_N" at the end of the device name means a new algorithm that matches the checksum of the Microchip development tool. The positioning of the IDs and the Configuration words fully satisfies the Microchip specifications. In the case that the user needs compatibility with the old data files, the user should use the algorithm without "_N" at the end of the device name. Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 03FF hex CUSTOMER ID 2000 - 2003 hex CONFIG. WORD 2007 hex The Configuration Word should be included in your hex file. Always check the location 2007 hex (in words) if the Configuration word is present. In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1bbb bbbb" where "bbbb" is ID information. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured. Without setting the Security Option the device will not be secured. Only LOAD operation is allowed on secured devices. When the device is secured, the User EPROM from 0000 hex to 03FF hex is scrambled. The customer IDs and the Configuration Word are readable. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x0000 : 0x03FF] + CONFIG_WORD & 0x001F + 0x3FE0 The blank unsecured devices have checksum = 0x3BFF The checksum formula for protected devices: CHECKSUM = SUM_XOR[0x0000 : 0x03FF] + (CONFIG_WORD &0x001F | 0x0060) The blank ALL secured devices have checksum = 0xFC6F. Configuration word is 0x006F. IDs are 0x007F. For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). Data in the User's RAM should have format: 00bbbbbbbbbbbbbb where 'b' is data bit. Bits #14 and #15 should be '0's. ************************************************************************ PIC12C672 / PIC12CE674 ---------------------- Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 07FE hex CALIBRATION WORD 07FF hex CUSTOMER ID 2000 - 2003 hex CONFIG. WORD 2007 hex The Configuration Word should be included in your hex file. Always check the location 2007 hex (in words) if the Configuration Word is present. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured. Without setting the Security Option the device will not be secured. Only LOAD operation is allowed on secured devices. When the device is 1/2 secured, the User EPROM from 0000 hex to 03FF hex, the Customer IDs and the Configuration Word are readable. When the device is 3/4 secured, the User EPROM from 0000 hex to 01FF hex, the Customer IDs and the Configuration Word are readable. When the device is ALL secured, only the Customer IDs and the Configuration Word are readable. The location 07FF hex is not blank on some OTP devices. It contains the oscillator calibration value. In this case the location is not changed during the programming. It keeps the original value from The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x0000 : 0x07FE] + CONFIG_WORD & 0x3FFF The blank unsecured devices have checksum = 0xF800 The checksum formula for ALL protected devices: CHECKSUM = CONFIG_WORD & 0x3FFF + SUM[IDs] The blank ALL secured devices have checksum = 0x009E. (Configuration word is 0x009F) The checksum formula for 3/4 protected devices: CHECKSUM = SUM[0x0000 : 0x01FF] + CONFIG_WORD & 0x3FFF + SUM[IDs] The blank 3/4 secured devices have checksum = 0x13BE. (Configuration word is 0x15BF) The checksum formula for 1/2 protected devices: CHECKSUM = SUM[0x0000 : 0x03FF] + CONFIG_WORD & 0x3FFF + SUM[IDs] The blank 1/2 secured devices have checksum = 0x26DE. (Configuration word is 0x2ADF) For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). ************************************************************************ PIC12C671 / PIC12CE673 ---------------------- Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 03FE hex CALIBRATION WORD 03FF hex CUSTOMER ID 2000 - 2003 hex CONFIG. WORD 2007 hex The Configuration Word should be included in your hex file. Always check the location 2007 hex (in words) if the Configuration Word is present. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured. Without setting the Security Option the device will not be secured. Only LOAD operation is allowed on secured devices. When the device is 1/2 secured, the User EPROM from 0000 hex to 01FF hex, the Customer IDs and the Configuration Word are readable. When the device is ALL secured, only the Customer IDs and the Configuration Word are readable. The location 03FF hex is not blank on some OTP devices. It contains the oscillator calibration value. In this case the location is not changed during the programming. It keeps the original value from the manufacturer. The value is usually in the range from 0000 hex to 00FF hex. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x0000 : 0x03FE] + CONFIG_WORD & 0x3FFF The blank unsecured devices have checksum = 0xFC00 The checksum formula for ALL protected devices: CHECKSUM = CONFIG_WORD & 0x3FFF + SUM[IDs] The blank ALL secured devices have checksum = 0x009E. (Configuration word is 0x009F) The checksum formula for 1/2 protected devices: CHECKSUM = SUM[0x0000 : 0x01FF] + CONFIG_WORD & 0x3FFF + SUM[IDs] The blank 1/2 secured devices have checksum = 0x13BE. (Configuration word is 0x15BF) For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). ************************************************************************ PIC12CE518 --------- PIC12C508A_N ------------ PIC12LC508A ------------ Blank state of User EPROM word: 0FFF hex Blank state of config word: 0FFF hex Blank state of ID word: 000F hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 01FE hex CALIBRATION WORD 01FF hex CUSTOMER ID 0200 - 0203 hex CONFIG. WORD 0FFF hex The Configuration Word should be included in your hex file. Always check the location 0FFF hex (in words) if the Configuration Word is present. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured regardless of the value in the configuration register word at address 0FFF hex in the Programmer User's RAM. Without setting the Security Option the device will not be secured. When the device is secured, the User EPROM from 0000 hex to 003F hex, the Customer IDs and the Configuration Word are readable. Only the LOAD operation is allowed on secured devices. The location 01FF hex is not blank on some OTP devices. It contains the oscillator calibration value. In this case the location is not changed during the programming. It keeps the original value from the manufacturer. The value is usually in the range from 0000 hex to 00FF hex. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x000 : 0x1FE] + CONFIG_WORD & 0x01F The blank unsecured devices have checksum = 0xEE20 The checksum formula for protected devices: CHECKSUM = SUM[0x000 : 0x03F] + CONFIG_WORD & 0x01F + SUM[IDs] For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). NOTE: Unused bits in the configuration word are not programmable. They stay as '1's. When the device is secured, those bits change values to '0's ************************************************************************ PIC12CE519 --------- PIC12C509_N ----------- PIC12C509A , PIC12C509A-SO -------------------------- This algorithm can program PIC12C509A. Blank state of User EPROM word: 0FFF hex Blank state of config word: 0FFF hex Blank state of ID word: 000F hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 03FE hex CALIBRATION WORD 03FF hex CUSTOMER ID 0400 - 0403 hex CONFIG. WORD 0FFF hex The Configuration Word should be included in your hex file. Always check the location 0FFF hex (in words) if the Configuration Word is present. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured regardless of the value in the configuration register word at address 0FFF hex in the Programmer User's RAM. Without setting the Security Option the device will not be secured. When the device is secured, the User EPROM from 0000 hex to 003F hex, the Customer IDs and the Configuration Word are readable. Only the LOAD operation is allowed on secured devices. The location 03FF hex is not blank on some OTP devices. It contains the oscillator calibration value. In this case the location is not changed during the programming. It keeps the original value from the manufacturer. The value is usually in the range from 0000 hex to 00FF hex. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x000 : 0x3FE] + CONFIG_WORD & 0x01F The blank unsecured devices have checksum = 0xEC20 The checksum formula for protected devices: CHECKSUM = SUM[0x000 : 0x03F] + CONFIG_WORD & 0x01F + SUM[IDs] For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). NOTE: Unused bits in the configuration word are not programmable. They stay as '1's. When the device is secured, those bits change values to '0's ************************************************************************ PIC12F629 ----------- PIC12LF629 ----------- PIC12F675 ----------- PIC12LF675 ----------- PIC16F630 ----------- PIC16LF630 ----------- PIC16F676 ----------- PIC16LF676 ----------- Blank state of Program Memory word: 3FFF hex Blank state of Configuration word: 01FF hex Blank state of Customer ID word: 3FFF hex Blank state of Data Memory word: 00FF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's Memory is partitioned as follows: in words -------------- PROGRAM MEMORY 0000 -> 03FE hex CALIBRATION WORD 03FF hex CUSTOMER ID 2000 -> 2003 hex BAND GAP BIT REPROGRAM FLAG 2004 hex CONFIGURATION WORD 2007 hex DATA MEMORY 2100 -> 207F hex The Configuration Word should be included in your hex file. Always check the memory map address location 2007 hex (in words) to verify that the Configuration Word is present. To secure the Program Memory of the device select the "Security fuse 1" option. To secure the EEPROM(Data Memory) of the device select the "Security fuse 2" option. When a device is secured, only a LOAD operation will be allowed. Please note that only the Customer IDs and the Configuration Word are readable on a protected device, all other data will be invalid relative to the security settings programmed by the user. The Oscillator Calibration Value and the Band Gap Bits in the Configuration Word are factory programmed data. During an Erase/Program Operation these Factory Programmed values are Oscillator Calibration Word and Band Gap Bits in the Configuration Word are stored and reprogrammed into the device. The algorithm that is available as part of the Version 8.3 software update allows the end user the ability to re-program these two sets of data to other than Factory programmed values. For further details please refer to the information further down in this section of the application note. For more information about Factory Programmed Oscillator Calibration Value and the Factory Programmed Band Gap Bits please contact Microchip Technical support. NOTE: To avoid verify errors during a stand alone verify operation please make sure the data at the Oscillator Calibration Value address is set to either 0000 hex or FFFF hex. The checksum computation is performed by using a formula dictated by Microchip's programming specifications: The checksum formula for unprotected devices: CHECKSUM = SUM[0x0000 : 0x03FE] + CONFIGURATION_WORD & 0x01FF The checksum formula for a fully protected devices: CHECKSUM = CONFIGURATION_WORD & 0x01FF + SUM[IDs] For more information please check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). REPROGRAMMING OSCILLATOR CALIBRATION WORD AND BAND GAP BITS IN THE CONFIGURATION WORD TO OTHER THAN THE FACTORY PROGRAMMED VALUES: To reprogram the Oscillator Calibration Word User RAM must have a valid Oscillator Calibration value at the Oscillator Calibration Word Address. The "Reset Clock" flag must be Enabled during the Erase / Program operation. To enable reprogramming of the Band Gap Bits in the Configuration Word, first set/reset the required bits in the Configuration Word. Second, set the enable value of A55A hex at the "BAND GAP BIT REPROGRAM FLAG" address, see above for correct address. ************************************************************************ PIC16F505 ----------- PIC16LF505 ----------- Blank state of Program Memory word: 0FFF hex Blank state of Configuration word: 0FFF hex Blank state of Customer ID word: 0FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's Memory is partitioned as follows: in words -------------- PROGRAM MEMORY 0000 -> 03FE hex CALIBRATION WORD 03FF hex CUSTOMER ID 0400 -> 0403 hex CALIBRATION WORD (BACKUP) 0404 hex CONFIGURATION WORD 07FF hex The Configuration Word should be included in your hex file. Always check the memory map address location 07FF hex (in words) to verify that the Configuration Word is present. To secure the Program Memory of the device select the "Security fuse 1" option. When a device is secured, only a LOAD operation will be allowed. Please note that only the first 40 Words, the Oscillator Calibration Words, the Customer IDs and the Configuration Word are readable on a protected device, all other data will be invalid. The Oscillator Calibration Value is factory programmed data. The algorithm that is available as part of the Version 8.3 software update allows the end user the ability to re-program this data to other than Factory programmed values. For further details please refer to the information further down in this section of the application note. During an Erase/Program Operation the Factory programmed Oscillator Calibration Word is stored and reprogrammed into the device. For more information on these Factory programmed values please contact Microchip Technical support. NOTE: To avoid verify errors during a stand alone verify operation please make sure the data at the Oscillator Calibration Value address is set to either 0000 hex or FFFF hex. The checksum computation is performed by using a formula dictated by Microchip's programming specifications: The checksum formula for unprotected devices: CHECKSUM = SUM[0x0000 : 0x03FE] + CONFIGURATION_WORD & 0x003F The checksum formula for a fully protected devices: CHECKSUM = SUM[0x0000 : 0x003F] + CONFIGURATION_WORD & 0x003F + SUM[IDs] For more information please check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). REPROGRAMMING OSCILLATOR CALIBRATION WORD TO OTHER THAN THE FACTORY PROGRAMMED VALUES: To reprogram the Oscillator Calibration Word User RAM must have a valid Oscillator Calibration value at the Oscillator Calibration Word Address. The "Reset Clock" flag must be Enabled during the Erase / Program operation. ************************************************************************ PIC10F222 ----------- PIC10F222 ----------- Blank state of Program Memory word: 0FFF hex Blank state of Configuration word: 0FFF hex Blank state of Customer ID word: 0FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's Memory is partitioned as follows: in words -------------- PROGRAM MEMORY 0000 -> 01FE hex CALIBRATION WORD 01FF hex CUSTOMER ID 0200 -> 0203 hex CALIBRATION WORD (BACKUP) 0204 hex CONFIGURATION WORD 07FF hex The Configuration Word should be included in your hex file. Always check the memory map address location 07FF hex (in words) to verify that the Configuration Word is present. To secure the Program Memory of the device select the "Security fuse 1" option. When a device is secured, only a LOAD operation will be allowed. Please note that only the first 40 Words, the Oscillator Calibration Words, the Customer IDs and the Configuration Word are readable on a protected device, all other data will be invalid. The Oscillator Calibration Value is factory programmed data. For further details please refer to the information further down in this section of the application note. During an Erase/Program Operation the Factory programmed Oscillator Calibration Word is stored and reprogrammed into the device. For more information on these Factory programmed values please contact Microchip Technical support. NOTE: To avoid verify errors during a stand alone verify operation please make sure the data at the Oscillator Calibration Value address is set to either 0000 hex or FFFF hex. The checksum computation is performed by using a formula dictated by Microchip's programming specifications: The checksum formula for unprotected devices: CHECKSUM = SUM[0x0000 : 0x03FE] + CONFIGURATION_WORD & 0x003F The checksum formula for a fully protected devices: CHECKSUM = SUM[0x0000 : 0x003F] + CONFIGURATION_WORD & 0x003F + SUM[IDs] For more information please check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). REPROGRAMMING OSCILLATOR CALIBRATION WORD TO OTHER THAN THE FACTORY PROGRAMMED VALUES: To reprogram the Oscillator Calibration Word User RAM must have a valid Oscillator Calibration value at the Oscillator Calibration Word Address. The "Reset Clock" flag must be Enabled during the Erase / Program operation. ***************************************************************************** PIC12F683 ------------ PIC12LF683 ------------ PIC16F684 ------------ PIC16LF684 ------------ Blank state of each Word of User Program Memory: 3FFF hex Blank state of each Word of ID Memory: 3FFF hex Blank state of each Word of EEPROM Data Memory: 00FF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: User Program Memory Address Range: 0000 -> 07FF hex ID Memory Address Range: 2000 -> 2003 hex Configuration Word Address: 2007 hex EEPROM Data Memory Address Range: 2100 -> 21FF hex Data for the flash portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Examples: 3A12 hex, 1C45 hex, 0A22 hex Data for the EEPROM portion of the memory (data memory) in the User's RAM should have the format: 00000000bbbbbbbb binary where 'b' is data bit. Bits from #8 to #15 should be '0's. Examples: 0012 hex, 00A1 hex, 00F1 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For this reason Microchip recommends that the ID location data be written as "0011 1111 1000 bbbb" where "bbbb" is the ID data. If the customer's data file does not contain EEPROM data, then the data programmed into the EEPROM will be what ever the data is that is already in the Programmer's User RAM at address locations: 2100 hex -> 21FF hex To keep the EEPROM blank, fill locations 2100h to 21FFh in the Programmer User RAM with 00FF hex before the programming. Check if the Configuration Word is included in your hex file. This can be done by downloading the data file into the programmer and checking the Programmer's User RAM at address locations 2007 hex. To secure the "User Program Memory" in the device, enable the "Program security fuse 1" flag. To secure the "EEPROM Data Memory" in the device, enable the "Program security fuse 2" flag. The Verfy, Blank Check, and Illegal Bit Check operations are not allowed on secured devices. The customer IDs(ID Memory) and the Configuration Word are always readable, regarless of the security set on the device. The checksum is calculated by using Microchip's CheckSum scheme: The checksum formula for Un-Protected Devices: CHECKSUM = SUM[0x0000 : 0x07FF] + (Configuration_Word & 0x0FFF) The blank unsecured devices have checksum = 0x07FF The checksum formula for Reading a Protected Device: CHECKSUM = (Configuration_Word & 0x0FFF) + SUM[IDs] The secured device with Erased State data checksum = 0x0F3E Please see the manufacturer's specifications for further information regarding Microchip's CheckSum scheme. Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting either "Intel Intellec 8/MDS translator (foramt code 83)" or Intel Hex 32(format code 99). For futher device specific information please consult the manufacturer's data sheet and/or programming specifications. ***************************************************************************** PIC16F690 ------------ PIC16LF690 ------------ Blank state of each Word of User Program Memory: 3FFF hex Blank state of each Word of ID Memory: 3FFF hex Blank state of each Word of EEPROM Data Memory: 00FF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: User Program Memory Address Range: 0000 -> 0FFF hex ID Memory Address Range: 2000 -> 2003 hex Configuration Word Address: 2007 hex EEPROM Data Memory Address Range: 2100 -> 21FF hex Data for the flash portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Examples: 3A12 hex, 1C45 hex, 0A22 hex Data for the EEPROM portion of the memory (data memory) in the User's RAM should have the format: 00000000bbbbbbbb binary where 'b' is data bit. Bits from #8 to #15 should be '0's. Examples: 0012 hex, 00A1 hex, 00F1 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For this reason Microchip recommends that the ID location data be written as "0011 1111 1000 bbbb" where "bbbb" is the ID data. If the customer's data file does not contain EEPROM data, then the data programmed into the EEPROM will be what ever the data is that is already in the Programmer's User RAM at address locations: 2100 hex -> 21FF hex To keep the EEPROM blank, fill locations 2100h to 21FFh in the Programmer User RAM with 00FF hex before the programming. Check if the Configuration Word is included in your hex file. This can be done by downloading the data file into the programmer and checking the Programmer's User RAM at address locations 2007 hex. To secure the "User Program Memory" in the device, enable the "Program security fuse 1" flag. To secure the "EEPROM Data Memory" in the device, enable the "Program security fuse 2" flag. The Verfy, Blank Check, and Illegal Bit Check operations are not allowed on secured devices. The customer IDs(ID Memory) and the Configuration Word are always readable, regarless of the security set on the device. The checksum is calculated by using Microchip's CheckSum scheme: The checksum formula for Un-Protected Devices: CHECKSUM = SUM[0x0000 : 0x0FFF] + (Configuration_Word & 0x0FFF) The blank unsecured devices have checksum = 0xFFFF The checksum formula for Reading a Protected Device: CHECKSUM = (Configuration_Word & 0x0FFF) + SUM[IDs] The secured device with Erased State data checksum = 0x0FBE Please see the manufacturer's specifications for further information regarding Microchip's CheckSum scheme. Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting either "Intel Intellec 8/MDS translator (foramt code 83)" or Intel Hex 32(format code 99). For futher device specific information please consult the manufacturer's data sheet and/or programming specifications. **************************************************************************** PIC16F916 ------------ PIC16LF916 ------------ Blank state of each Word of User Program Memory: 3FFF hex Blank state of each Word of ID Memory: 3FFF hex Blank state of each Word of EEPROM Data Memory: 00FF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: User Program Memory Address Range: 0000 -> 1FFF hex ID Memory Address Range: 2000 -> 2003 hex Configuration Word Address: 2007 hex EEPROM Data Memory Address Range: 2100 -> 21FF hex Data for the flash portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Examples: 3A12 hex, 1C45 hex, 0A22 hex Data for the EEPROM portion of the memory (data memory) in the User's RAM should have the format: 00000000bbbbbbbb binary where 'b' is data bit. Bits from #8 to #15 should be '0's. Examples: 0012 hex, 00A1 hex, 00F1 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For this reason Microchip recommends that the ID location data be written as "0011 1111 1000 bbbb" where "bbbb" is the ID data. If the customer's data file does not contain EEPROM data, then the data programmed into the EEPROM will be what ever the data is that is already in the Programmer's User RAM at address locations: 2100 hex -> 21FF hex To keep the EEPROM blank, fill locations 2100h to 21FFh in the Programmer User RAM with 00FF hex before the programming. Check if the Configuration Word is included in your hex file. This can be done by downloading the data file into the programmer and checking the Programmer's User RAM at address locations 2007 hex. To secure the "User Program Memory" in the device, enable the "Program security fuse 1" flag. To secure the "EEPROM Data Memory" in the device, enable the "Program security fuse 2" flag. The Verfy, Blank Check, and Illegal Bit Check operations are not allowed on secured devices. The customer IDs(ID Memory) and the Configuration Word are always readable, regarless of the security set on the device. The checksum is calculated by using Microchip's CheckSum scheme: The checksum formula for Un-Protected Devices: CHECKSUM = SUM[0x0000 : 0x1FFF] + (Configuration_Word & 0x1FFF) The blank unsecured devices have checksum = 0xFFFF The checksum formula for Reading a Protected Device: CHECKSUM = (Configuration_Word & 0x1FFF) + SUM[IDs] The secured device with Erased State data checksum = 0x1FBE Please see the manufacturer's specifications for further information regarding Microchip's CheckSum scheme. Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting either "Intel Intellec 8/MDS translator (foramt code 83)" or Intel Hex 32(format code 99). For futher device specific information please consult the manufacturer's data sheet and/or programming specifications. **************************************************************************** PIC16C58B_N ----------- PIC16C57C_N ------------ Blank state of User EPROM word: 0FFF hex Blank state of config word: 0FFF hex Blank state of ID word: 000F hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 07FF hex CUSTOMER ID 0800 - 0803 hex CONFIG. WORD 0FFF hex The Configuration Word should be included in your hex file. Always check the location 0FFF hex (in words) if the Configuration Word is present. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured regardless of the value in the configuration register word at address 0FFF hex in the Programmer User's RAM. Without setting the Security Option the device will not be secured. When the device is secured, the User EPROM from 0000 hex to 003F hex, the Customer IDs and the Configuration Word are readable. Only the LOAD operation is allowed on secured devices. The location 0FFF hex is not blank on some OTP devices. It contains the oscillator parameters. In this case the location is not changed during the programming. It keeps the original value from the manufacturer. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x000 : 0x7FF] + CONFIG_WORD & 0xFFF The blank unsecured devices have checksum = 0x0DFF The checksum formula for protected devices: CHECKSUM = SUM[0x000 : 0x03F] + CONFIG_WORD & 0xFFF + SUM[IDs] The blank secured devices have checksum = 0x0DC6. For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). ************************************************************************ PIC16C56A_N ------------ Blank state of User EPROM word: 0FFF hex Blank state of config word: 0FFF hex Blank state of ID word: 000F hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 03FF hex CUSTOMER ID 0400 - 0403 hex CONFIG. WORD 0FFF hex The Configuration Word should be included in your hex file. Always check the location 0FFF hex (in words) if the Configuration Word is present. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured regardless of the value in the configuration register word at address 0FFF hex in the Programmer User's RAM. Without setting the Security Option the device will not be secured. When the device is secured, the User EPROM from 0000 hex to 003F hex, the Customer IDs and the Configuration Word are readable. Only the LOAD operation is allowed on secured devices. The location 0FFF hex is not blank on some OTP devices. It contains the oscillator parameters. In this case the location is not changed during the programming. It keeps the original value from the manufacturer. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x000 : 0x3FF] + CONFIG_WORD & 0xFFF The blank unsecured devices have checksum = 0x0BFF The checksum formula for protected devices: CHECKSUM = SUM[0x000 : 0x03F] + CONFIG_WORD & 0xFFF + SUM[IDs] The blank secured devices have checksum = 0x0BC6. For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). ************************************************************************ PIC16C55A_N ----------- PIC16C54C_N ----------- PIC16C54B_N ----------- PIC16CR54C_N ------------ Blank state of User EPROM word: 0FFF hex Blank state of config word: 0FFF hex Blank state of ID word: 000F hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 01FF hex CUSTOMER ID 0200 - 0203 hex CONFIG. WORD 0FFF hex The Configuration Word should be included in your hex file. Always check the location 0FFF hex (in words) if the Configuration Word is present. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured regardless of the value in the configuration register word at address 0FFF hex in the Programmer User's RAM. Without setting the Security Option the device will not be secured. When the device is secured, the User EPROM from 0000 hex to 003F hex, the Customer IDs and the Configuration Word are readable. Only the LOAD operation is allowed on secured devices. The location 0FFF hex is not blank on some OTP devices. It contains the oscillator parameters. In this case the location is not changed during the programming. It keeps the original value from the manufacturer. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x000 : 0x1FF] + CONFIG_WORD & 0xFFF The blank unsecured devices have checksum = 0x0DFF The checksum formula for protected devices: CHECKSUM = SUM[0x000 : 0x03F] + CONFIG_WORD & 0xFFF + SUM[IDs] The blank secured devices have checksum = 0x0DC6. For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). ************************************************************************ PIC16C54A_N ----------- Blank state of User EPROM word: 0FFF hex Blank state of config word: 0FFF hex Blank state of ID word: 000F hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 01FF hex CUSTOMER ID 0200 - 0203 hex CONFIG. WORD 0FFF hex The Configuration Word should be included in your hex file. Always check the location 0FFF hex (in words) if the Configuration Word is present. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured regardless of the value in the configuration register word at address 0FFF hex in the Programmer User's RAM. Without setting the Security Option the device will not be secured. When the device is secured, the User EPROM from 0000 hex to 01FF hex will show scrambled data, although the Configuration Word and the Customer IDs will be readable. Only the LOAD operation is allowed on secured devices. The location 0FFF hex is not blank on some OTP devices. It contains the oscillator parameters. In this case the location is not changed during the programming. It keeps the original value from the manufacturer. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x000 : 0x1FF] + CONFIG_WORD & 0x0FFF The blank unsecured devices have checksum = 0x0DFF The checksum formula for protected devices: CHECKSUM = SUM_XOR4[0x000 : 0x1FF] + CONFIG_WORD & 0x00F The blank secured devices have checksum = 0x1E07. For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). ************************************************************************ PIC16C54_N ----------- Blank state of User EPROM word: 0FFF hex Blank state of config word: 0FFF hex Blank state of ID word: 000F hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 01FF hex CUSTOMER ID 0200 - 0203 hex CONFIG. WORD 0FFF hex The Configuration Word should be included in your hex file. Always check the location 0FFF hex (in words) if the Configuration Word is present. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured regardless of the value in the configuration register word at address 0FFF hex in the Programmer User's RAM. Without setting the Security Option the device will not be secured. When the device is secured, the User EPROM from 0000 hex to 01FF hex will show scrambled data, although the Configuration Word and the Customer IDs will be readable. Only the LOAD operation is allowed on secured devices. The location 0FFF hex is not blank on some OTP devices. It contains the oscillator parameters. In this case the location is not changed during the programming. It keeps the original value from the manufacturer. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x000 : 0x1FF] + CONFIG_WORD & 0x00F + 0x0FF0 The blank unsecured devices have checksum = 0x0DFF The checksum formula for protected devices: CHECKSUM = SUM_XOR4[0x000 : 0x1FF] + CONFIG_WORD & 0x00F The blank secured devices have checksum = 0x1E07. For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). ************************************************************************ PIC16C52_N ----------- Blank state of User EPROM word: 0FFF hex Blank state of config word: 0FFB hex Blank state of ID word: 000F hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 017F hex CONFIG. WORD 0FFF hex The Configuration Word should be included in your hex file. Always check the location 0FFF hex (in words) if the Configuration Word is present. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured regardless of the value in the configuration register word at address 0FFF hex in the Programmer User's RAM. Without setting the Security Option the device will not be secured. When the device is secured, the User EPROM from 0000 hex to 017F hex will show scrambled data, although the Configuration Word will be readable. Only the LOAD operation is allowed on secured devices. The location 0FFF hex is not blank on some OTP devices. It contains the oscillator parameters. In this case the location is not changed during the programming. It keeps the original value from the manufacturer. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x000 : 0x17F] + CONFIG_WORD & 0x00B The blank unsecured devices have checksum = 0xFE8B The checksum formula for protected devices: CHECKSUM = SUM_XOR4[0x000 : 0x17F] + CONFIG_WORD & 0x00B The blank secured devices have checksum = 0x1683. For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). ************************************************************************ PIC16C505 ----------- PIC16LC505 ----------- Blank state of User EPROM word: 0FFF hex Blank state of config word: 0FFF hex Blank state of ID word: 0FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 03FE hex CALIBRATION WORD 03FF hex CUSTOMER ID 0400 - 0403 hex CONFIG. WORD 0FFF hex The Configuration Word should be included in your hex file. Always check the location 0FFF hex (in words) if the Configuration Word is present. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured regardless of the value in the configuration register word at address 0FFF hex in the Programmer User's RAM. Without setting the Security Option the device will not be secured. When the device is secured, the User EPROM from 0000 hex to 003F hex, the Customer IDs and the Configuration Word are readable. Only the LOAD operation is allowed on secured devices. The location 03FF hex is not blank on some OTP devices. It contains the oscillator calibration value. In this case the location is not changed during the programming. It keeps the original value from the manufacturer. The value is usually in the range from 0000 hex to 00FF hex. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x000 : 0x3FE] + CONFIG_WORD & 0xFFF The blank unsecured devices have checksum = 0xFC00 The checksum formula for protected devices: CHECKSUM = SUM[0x000 : 0x03F] + CONFIG_WORD & 0xFFF + SUM[IDs] The blank secured devices have checksum = 0xFFEE. For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). CONFIGURATION WORD BIT MAP |Bit Number: |11|10| 9| 8| 7| 6| 5 | 4| 3 | 2 | 1 | 0 | |-------------|--|--|--|--|--|--|-----|--|----|-----|-----|-----| | |CP|CP|CP|CP|CP|CP|MCLRE|CP|WDTE|FOSC2|FOSC1|FOSC0| |_____________|__|__|__|__|__|__|_____|__|____|_____|_____|_____| bit number:11-6, 4: CP: Code Protection bits These bits are programmed(Enabled/Disabled) with the "Program security fuse: Y/N" flag. bit number:5: MCLRE: RB3/MCLR Pin Function Select bit 1 = RB3/MCLR pin function is MCLR 0 = RB3/MCLR pin function is digital I/O, MCLR internally tied to VDD bit number:3: WDTE: Watchdog Timer Enable bit 1 = WDT enabled 0 = WDT disabled bit number:2 -> 0: FOSC2:FOSC0: Oscillator Selection bits 111 = External RC oscillator/CLKOUT function on RB4/OSC2/CLKOUT pin 110 = External RC oscillator/RB4 function on RB4/OSC2/CLKOUT pin 101 = Internal RC oscillator/CLKOUT function on RB4/OSC2/CLKOUT pin 100 = Internal RC oscillator/RB4 function on RB4/OSC2/CLKOUT pin 011 = Invalid selection 010 = HS oscillator 001 = XT oscillator 000 = LP oscillator Note: The Address 03FFh is always uncode protected on the PIC16C505. This location contains the MOVLW xx calibration instruction for the INTRC. ************************************************************************ PIC16C710_N ----------- "_N" at the end of the device name means a new algorithm that matches the checksum of the Microchip development tool. The positioning of the IDs and the Configuration words fully satisfies the Microchip specifications. In the case that the user needs compatibility with the old data files, the user should use the algorithm without "_N" at the end of the device name. Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 01FF hex CUSTOMER ID 2000 - 2003 hex CONFIG. WORD 2007 hex The Configuration Word should be included in your hex file. Always check the location 2007 hex (in words) if the Configuration word is present. In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1bbb bbbb" where "bbbb" is ID information. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured. Without setting the Security Option the device will not be secured. Only LOAD operation is allowed on secured devices. When the device is secured, only the User EPROM from 0000 hex to 003F hex is not scrambled. The customer IDs and the Configuration Word are readable. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x0000 : 0x01FF] + CONFIG_WORD & 0x3FFF The blank unsecured devices have checksum = 0x3DFF The checksum formula for protected devices: CHECKSUM = CHECKSUM = SUM[0x000 : 0x03F] + CONFIG_WORD & 0x3FFF + SUM[IDs] For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). Data in the User's RAM should have format: 00bbbbbbbbbbbbbb where 'b' is data bit. Bits #14 and #15 should be '0's. ************************************************************************ PIC16C711_N / PIC16LC711_N -------------------------- "_N" at the end of the device name means a new algorithm that matches the checksum of the Microchip development tool. The positioning of the IDs and the Configuration words fully satisfies the Microchip specifications. In the case that the user needs compatibility with the old data files, the user should use the algorithm without "_N" at the end of the device name. Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 03FF hex CUSTOMER ID 2000 - 2003 hex CONFIG. WORD 2007 hex The Configuration Word should be included in your hex file. Always check the location 2007 hex (in words) if the Configuration word is present. In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1bbb bbbb" where "bbbb" is ID information. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured. Without setting the Security Option the device will not be secured. Only LOAD operation is allowed on secured devices. When the device is secured, only the User EPROM from 0000 hex to 003F hex is not scrambled. The customer IDs and the Configuration Word are readable. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x0000 : 0x03FF] + CONFIG_WORD & 0x3FFF The blank unsecured devices have checksum = 0x3BFF The checksum formula for protected devices: CHECKSUM = SUM[0x000 : 0x03F] + CONFIG_WORD & 0x3FFF + SUM[IDs] For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). Data in the User's RAM should have format: 00bbbbbbbbbbbbbb where 'b' is data bit. Bits #14 and #15 should be '0's. ************************************************************************ PIC17C756A PIC17C756_N PIC17C766 ----------- "_N" at the end of the device name means a new algorithm that matches the checksum of the Microchip development tool. The positioning of the IDs and the Configuration words fully satisfies the Microchip specifications. Blank state of the User EPROM word: FFFF hex Blank state of config word: usually FFFF hex (can be different) The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: WORD address(x16 format) BYTE address(x8 format) ------------------------ ----------------------- USER EPROM 00000 -> 03FFF hex 00000 -> 07FFF hex CONFIG. WORD 0FE00 hex 1FC00 -> 1FC01 hex The Configuration Word should be included in your hex file. Always check the location FE00 hex (in words)if the Configuration Word is present. When securing the device (programming to Code Protected Microcontroller Mode), bits PM0, PM1 and PM2 must be set to '0' in the Configuration Word (check the Programmer's User RAM). Also the Security Option in the PROGRAM DEVICE screen must be enabled (set to 'Y'). When editing the Programmer's User RAM with Word Width feature enabled, the low byte of the Configuration Word is the one marked with LL (value AFh). CONFIGURATION WORD: BYTE address VALUE/FORMAT -------------------- -------------- 1FC00 hex, 1FC01 hex AF hex, 40 hex LL HH WORD address VALUE/FORMAT ------------------ -------------- 0FE00 hex 40AF HHLL The mapping of each bit in the Configuration Word is as follow: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 ---------------------------------------------------------------- 1 PM1 1 PM0 WDTPS1 WDTPS0 FOSC1 FOSC2 bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 ---------------------------------------------------------------- PM2 BODEN 1 1 1 1 1 1 Legal values of bits PM2, PM1 and PM0 in Config. Word: PM2 PM1 PM0 --- --- --- 0 0 0 --- Code Protected Mic. Mode 1 0 1 --- Extended Mic. Mode 1 1 0 --- Microcontroller Mode 1 1 1 --- Microprocessor Mode NOTE: If the device is secured, all data are encrypted. When compare such device to the original data file, misverify error occurs. NOTES: Always enable at least one pass verify when programming. If the device is secured, all data are encrypted. When compare such device to the original data file, misverify error occurs. Some secured devices show bit #8, #9, #10, #11, #12, and bit #13 in the Configuration Word programmed to '0' even if these bits were in the hex file set to '1'. ************************************************************************ PIC17C752 PIC17C752_N PIC17C762 ----------- "_N" at the end of the device name means a new algorithm that matches the checksum of the Microchip development tool. The positioning of the IDs and the Configuration words fully satisfies the Microchip specifications. Blank state of the User EPROM word: FFFF hex Blank state of config word: usually FFFF hex (can be different) The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 1FFF hex CONFIG. WORD FE00 hex The Configuration Word should be included in your hex file. Always check the location FE00 hex (in words)if the Configuration Word is present. When securing the device (programming to Code Protected Microcontroller Mode), bits PM0, PM1 and PM2 must be set to '0' in the Configuration Word (check the Programmer's User RAM). Also the Security Option in the PROGRAM DEVICE screen must be enabled (set to 'Y'). When editing the Programmer's User RAM with Word Width feature enabled, the low byte of the Configuration Word is the one marked with LL (value AFh). ADDRESS VALUE ------- ----- FE00 40AF HHLL The mapping of each bit in the Configuration Word is as follow: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 ---------------------------------------------------------------- 1 PM1 1 PM0 WDTPS1 WDTPS0 FOSC1 FOSC2 bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 ---------------------------------------------------------------- PM2 BODEN 1 1 1 1 1 1 Legal values of bits PM2, PM1 and PM0 in Config. Word: PM2 PM1 PM0 --- --- --- 0 0 0 --- Code Protected Mic. Mode 1 0 1 --- Extended Mic. Mode 1 1 0 --- Microcontroller Mode 1 1 1 --- Microprocessor Mode NOTE: If the device is secured, all data are encrypted. When compare such device to the original data file, misverify error occurs. NOTES: Always enable at least one pass verify when programming. If the device is secured, all data are encrypted. When compare such device to the original data file, misverify error occurs. Some secured devices show bit #8, #9, #10, #11, #12, and bit #13 in the Configuration Word programmed to '0' even if these bits were in the hex file set to '1'. ************************************************************************ PIC16C773 PIC16LC774 "_N" at the end of the device name means a new algorithm that matches the checksum of the Microchip development tool. The positioning of the IDs and the Configuration words fully satisfies the Microchip specifications. In the case that the user needs compatibility with the old data files, the user should use the algorithm without "_N" at the end of the device name. Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 0FFF hex CUSTOMER ID 2000 - 2003 hex CONFIG. WORD 2007 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1bbb bbbb" where "bbbb" is ID information. The Configuration Word should be included in your hex file. Always check the location 2007 hex (in words) if the Configuration word is present. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured using the value from the word at address 2007 hex in the Programmer User's RAM. Without setting the Security Option the device will not be secured and also an error "INVALID SECURITY BITS IN CONFIG. WORD" is generated. When the device is 1/2 secured, the User EPROM from 0000 hex to 07FF hex, the Customer IDs and the Configuration Word are readable. When the device is 3/4 secured, the User EPROM from 0000 hex to 03FF hex, the Customer IDs and the Configuration Word are readable. When the device is ALL secured, only the Customer IDs and the Configuration Word are readable. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x0000 : 0x07FF] + CONFIG_WORD & 0x3F7F The blank unsecured devices have checksum = 0x2F7F The checksum formula for ALL protected devices: CHECKSUM = CONFIG_WORD & 0x3F7F + SUM[IDs] The checksum formula for 3/4 protected devices: CHECKSUM = SUM[0x0000 : 0x01FF] + CONFIG_WORD & 0x3F7F + SUM[IDs] The checksum formula for 1/2 protected devices: CHECKSUM = SUM[0x0000 : 0x03FF] + CONFIG_WORD & 0x3F7F + SUM[IDs] For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). Data in the User's RAM should have format: 00bbbbbbbbbbbbbb where 'b' is data bit. Bits #14 and #15 should be '0's. For more check the manufacturer's specifications. NOTE: On some windowed parts it is hard to erase security bits in the configuration register. Do not secure these parts if reusability is required. ************************************************************************ PIC16CE625 ---------- Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 07FF hex CUSTOMER ID 2000 - 2003 hex CONFIG. WORD 2007 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1bbb bbbb" where "bbbb" is ID information. The Configuration Word should be included in your hex file. Always check the location 2007 hex (in words) if the Configuration word is present. The value of the unused bit (bit #7) in the Configuration Word should be set to '1'. All of the CP<1:0> pairs in the Configuration Word at address 2007 hex have to be given the same value to enable the code protection scheme. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured using the value from the word at address 2007 hex in the Programmer User's RAM. Without setting the Security Option the device will not be secured and also an error "INVALID SECURITY BITS IN CONFIG. WORD" is generated. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices (CP1 = 1, CP0 = 1): CHECKSUM = SUM[0x0000 : 0x07FF] + CONFIG_WORD & 0x3F7F The blank unsecured devices have checksum = 0x377F The checksum formula for ALL protected devices (CP1 = 0, CP0 = 0): CHECKSUM = CONFIG_WORD & 0x3F7F + SUM[IDs] The checksum formula for 3/4 protected devices (CP1 = 0, CP0 = 1): CHECKSUM = SUM[0x0000 : 0x01FF] + CONFIG_WORD & 0x3F7F + SUM[IDs] The checksum formula for 1/2 protected devices (CP1 = 1, CP0 = 0): CHECKSUM = SUM[0x0000 : 0x03FF] + CONFIG_WORD & 0x3F7F + SUM[IDs] When the device is 1/2 secured, the User EPROM from 0000 hex to 03FF hex, the Customer IDs and the Configuration Word are readable. When the device is 3/4 secured, the User EPROM from 0000 hex to 01FF hex, the Customer IDs and the Configuration Word are readable. When the device is ALL secured, only the Customer IDs and the Configuration Word are readable. For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). Data in the User's RAM should have format: 00bbbbbbbbbbbbbb where 'b' is data bit. Bits #14 and #15 should be '0's. For more check the manufacturer's specifications. NOTE: On some windowed parts it is hard to erase security bits in the configuration register. Do not secure these parts if reusability is required. ************************************************************************ PIC16CE624 ---------- Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 03FF hex CUSTOMER ID 2000 - 2003 hex CONFIG. WORD 2007 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1bbb bbbb" where "bbbb" is ID information. The Configuration Word should be included in your hex file. Always check the location 2007 hex (in words) if the Configuration word is present. The value of the unused bit (bit #7) in the Configuration Word should be set to '1'. All of the CP<1:0> pairs in the Configuration Word at address 2007 hex have to be given the same value to enable the code protection scheme. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured using the value from the word at address 2007 hex in the Programmer User's RAM. Without setting the Security Option the device will not be secured and also an error "INVALID SECURITY BITS IN CONFIG. WORD" is generated. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices (CP1 = 1, CP0 = 1): CHECKSUM = SUM[0x0000 : 0x03FF] + CONFIG_WORD & 0x3F7F The blank unsecured devices have checksum = 0x3B7F The checksum formula for ALL protected devices (CP1 = 0, CP0 = 0): CHECKSUM = CONFIG_WORD & 0x3F7F + SUM[IDs] The checksum formula for 1/2 protected devices (CP1 = 0, CP0 = 1): CHECKSUM = SUM[0x0000 : 0x01FF] + CONFIG_WORD & 0x3F7F + SUM[IDs] When the device is 1/2 secured, the User EPROM from 0000 hex to 01FF hex, the Customer IDs and the Configuration Word are readable. When the device is ALL secured, only the Customer IDs and the Configuration Word are readable. For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). Data in the User's RAM should have format: 00bbbbbbbbbbbbbb where 'b' is data bit. Bits #14 and #15 should be '0's. For more check the manufacturer's specifications. NOTE: On some windowed parts it is hard to erase security bits in the configuration register. Do not secure these parts if reusability is required. ************************************************************************ PIC16CE623 ---------- Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 01FF hex CUSTOMER ID 2000 - 2003 hex CONFIG. WORD 2007 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1bbb bbbb" where "bbbb" is ID information. The Configuration Word should be included in your hex file. Always check the location 2007 hex (in words) if the Configuration word is present. The value of the unused bit (bit #7) in the Configuration Word should be set to '1'. All of the CP<1:0> pairs in the Configuration Word at address 2007 hex have to be given the same value to enable the code protection scheme. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured using the value from the word at address 2007 hex in the Programmer User's RAM. Without setting the Security Option the device will not be secured and also an error "INVALID SECURITY BITS IN CONFIG. WORD" is generated. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices (CP1 = 1, CP0 = 1): CHECKSUM = SUM[0x0000 : 0x03FF] + CONFIG_WORD & 0x3F7F The blank unsecured devices have checksum = 0x3D7F The checksum formula for ALL protected devices (CP1 = 0, CP0 = 0): CHECKSUM = CONFIG_WORD & 0x3F7F + SUM[IDs] When the device is ALL secured, only the Customer IDs and the Configuration Word are readable. For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). Data in the User's RAM should have format: 00bbbbbbbbbbbbbb where 'b' is data bit. Bits #14 and #15 should be '0's. For more check the manufacturer's specifications. NOTE: On some windowed parts it is hard to erase security bits in the configuration register. Do not secure these parts if reusability is required. ************************************************************************ PIC16F627/PIC16LF627 --------------------- Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 03FF hex flash cells CUSTOMER ID 2000 - 2003 hex flash cells CONFIG. WORD 2007 hex flash cell EEPROM 2100 - 217F hex EEPROM cells Data for the flash portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Example: 3A12 hex, 1C45 hex, 0A22 hex Data for the EEPROM portion of the memory (data memory) in the User's RAM should have format: 00000000bbbbbbbb binary where 'b' is data bit. Bits from #8 to #15 should be '0's. Example: 0012 hex, 00A1 hex, 00F1 hex In some devices, the ID locations read-out in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1bbb bbbb" where "bbbb" is ID information. If the customer's data file does not contain EEPROM data, the EEPROM will be programmed with the data from locations 2100 hex to 217F hex in the Programmer User RAM. To keep the EEPROM blank, fill locations 2100 hex to 217F hex in the Programmer User RAM with 00FF hex before the programming. Check if the Configuration Word is included in your hex file. This can be done by downloading the data file into the programmer and checking the location 2007 hex (in words). To secure the device, set the Security Option in the PROGRAM DEVICE to 'Y'. After programming with this option enabled,the device is secured. The protection level depends on values of CP0, CP1 and CPD bits in the Configuration Word at location 2007 hex (in words). Without setting the Security Option and proper setting of CP0, CP1 and CPD bits in the Configuration word,the device will not be secured. Also an error "INVALID SECURITY BITS IN CONFIG. WORD" is generated if proper setting of CP0,CP1 and CPD is not done. Positions of Protection (Security) bits in the Configuration word: bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ------------------------------------------------------------------------ '0' '0' CP1 CP0 CP1 CP0 '1' CPD D D D D D D D D CP1, CP0, CPD are the protection bits. '1' is the reserved bit. Reads as '1'. D is a data bit as FOSC0, FOSC1,... VERIFY and BLANK-CHECK operations are not allowed on secured devices. The customer IDs and the Configuration Word are always readable. Even on secured devices. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. At the end of the programming, even if the Security Option in the PROGRAM DEVICE is set to 'Y', the check sum is calculated from the whole array (SUM[0x0000 : 0x03FF] + CONFIG_WORD & 0x3DFF). The checksum formula for unprotected devices (CP1/CP0 = 11): CHECKSUM = SUM[0x0000 : 0x03FF] + CONFIG_WORD & 0x3DFF The blank unsecured devices have checksum = 0x39FF. The checksum formula for fully protected devices (CP1/CP0 = 00): CHECKSUM = CONFIG_WORD & 0x3DFF + SUM[IDs] The blank ALL secured devices have checksum = 0x01FE. (Configuration word is 0x03FF) The checksum formula for protected devices with CP1/CP0 = 01 : CHECKSUM = SUM[0x0000 : 0x01FF] + CONFIG_WORD & 0x3DFF + SUM[IDs] The blank secured devices with CP1/CP0 = 01 have checksum = 0x13FE. (Configuration word is 0x17FF) The blank check is not performed on the EEPROM (data memory). Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). For more check the manufacturer's specifications. ************************************************************************ PIC16F628/PIC16LF628 --------------------- Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 07FF hex flash cells CUSTOMER ID 2000 - 2003 hex flash cells CONFIG. WORD 2007 hex flash cell EEPROM 2100 - 217F hex EEPROM cells Data for the flash portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Example: 3A12 hex, 1C45 hex, 0A22 hex Data for the EEPROM portion of the memory (data memory) in the User's RAM should have format: 00000000bbbbbbbb binary where 'b' is data bit. Bits from #8 to #15 should be '0's. Example: 0012 hex, 00A1 hex, 00F1 hex In some devices, the ID locations read-out in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1bbb bbbb" where "bbbb" is ID information. If the customer's data file does not contain EEPROM data, the EEPROM will be programmed with the data from locations 2100 hex to 217F hex in the Programmer User RAM. To keep the EEPROM blank, fill locations 2100 hex to 217F hex in the Programmer User RAM with 00FF hex before the programming. Check if the Configuration Word is included in your hex file. This can be done by downloading the data file into the programmer and checking the location 2007 hex (in words). To secure the device, set the Security Option in the PROGRAM DEVICE to 'Y'. After programming,with this option enabled,the device is secured. The protection level depends on values of CP0, CP1 and CPD bits in the Configuration Word at location 2007 hex (in words). Without setting the Security Option and proper setting of CP0, CP1 and CPD bits in the Configuration word,the device will not be secured. Also an error "INVALID SECURITY BITS IN CONFIG. WORD" is generated if proper setting of CP0,CP1 and CPD is not done. Positions of Protection (Security) bits in the Configuration word: bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ------------------------------------------------------------------------ '0' '0' CP1 CP0 CP1 CP0 '1' CPD D D D D D D D D CP1, CP0, CPD are the protection bits. '1' is the reserved bit. Reads as '1'. D is a data bit as FOSC0, FOSC1,... VERIFY and BLANK-CHECK operations are not allowed on secured devices. The customer IDs and the Configuration Word are always readable. Even on secured devices. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. At the end of the programming, even if the Security Option in the PROGRAM DEVICE is set to 'Y', the check sum is calculated from the whole array (SUM[0x0000 : 0x07FF] + CONFIG_WORD & 0x3DFF). The checksum formula for unprotected devices (CP1/CP0 = 11): CHECKSUM = SUM[0x0000 : 0x07FF] + CONFIG_WORD & 0x3DFF The blank unsecured devices have checksum = 0x35FF. The checksum formula for fully protected devices (CP1/CP0 = 00): CHECKSUM = CONFIG_WORD & 0x3DFF + SUM[IDs] The blank ALL secured devices have checksum = 0x01FE. (Configuration word is 0x03FF) The checksum formula for protected devices with CP1/CP0 = 10 : CHECKSUM = SUM[0x0000 : 0x03FF] + CONFIG_WORD & 0x3DFF + SUM[IDs] The blank secured devices with CP1/CP0 = 10 have checksum = 0x25FE. (Configuration word is 0x2BFF) The checksum formula for protected devices with CP1/CP0 = 01 : CHECKSUM = SUM[0x0000 : 0x01FF] + CONFIG_WORD & 0x3DFF + SUM[IDs] The blank secured devices with CP1/CP0 = 01 have checksum = 0x13FE. (Configuration word is 0x17FF) The blank check is not performed on the EEPROM (data memory). Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). For more check the manufacturer's specifications. ************************************************************************ PIC18C442/PIC18LC442 PIC18C242/PIC18LC242 -------------------- The device memory map corresponds directly to the progammer's User RAM. Data in the programmer's User Memory is partitioned as follows: address range in bytes ---------------------- USER EPROM 000000 - 003FFF hex USER ID 200000 - 200007 hex CONFIG. WORD 300000 - 300006 hex Device ID 1 & 2 3FFFFE - 3FFFFF hex Blank state for Program memory :FF hex Blank state for user ID :FF hex Blank state for configuration data: CONFIG1L: FF hex (address 300000 hex) CONFIG1H: E7 hex (address 300001 hex) CONFIG2L: 0F hex (address 300002 hex) CONFIG2H: 0F hex (address 300003 hex) CONFIG3H: 01 hex (address 300005 hex) CONFIG4L: 03 hex (address 300006 hex) The ID locations do not read-out in scrambled fashion after code protection is enabled. But it is recommended that ID location is written as "1111 bbbb" where "bbbb" is ID information. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE screen to 'Y'. Verify, blank check and program operations are not allowed on secured devices. The customer IDs and the Configuration bytes are always readable. Even on secured devices. The checksum is calculated by using Microchip's checksum scheme where the ID is set to USER ENTRY. At the end of the programming, even if the Security Option in the PROGRAM MEMORY DEVICE is set to 'Y', the check sum is calculated as: The checksum formula for unprotected devices: SUM[0x0000:0x3FFF] + CONFIG1L & 0xFF + CONFIG1H & 0x27 + CONFIG2L & 0x0F + CONFIG2H & 0x0F + CONFIG3H & 0x01 + CONFIG4L & 0x01 The blank unsecured devices have checksum = 0xC146 The checksum formula for protected devices: CONFIG1L & 0xFF + CONFIG1H & 0x27 + CONFIG2L & 0xF + CONFIG2H & 0x0F + CONFIG3H & 0x01 + CONFIG4L & 0x01 + SUM_ID The blank secured devices have checksum = 0x0BF. For more, check the manufacturer's specifications. NOTE: On some windowed parts it is hard to erase security bits in the configuration data. Do not secure these parts if reusability is required. ************************************************************************ PIC18C452/PIC18LC452 PIC18C252 -------------------- The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in bytes -------------- USER EPROM 0000 - 07FFF hex USER ID 200000 - 200007 hex CONFIG. WORD 300000 - 300006 hex DID 3FFFFE - 3FFFFF hex Blank state for Program memory :FF hex Blank state for user ID :FF hex Blank state for configuration data: CONFIG1L : FF hex CONFIG1H : E7 hex CONFIG2L : 0F hex CONFIG2H : 0F hex CONFIG3H : 01 hex CONFIG4L : 03 hex The ID locations do not read-out in scrambled fashion after code protection is enabled. But it is recommended that ID location is written as "1111 bbbb" where "bbbb" is ID information. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. Without setting the Security Option the device will not be secured. Verify, blank check and program operations are not allowed on secured devices. The customer IDs and the Configuration bytes are always readable. Even on secured devices. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. At the end of the programming, even if the Security Option in the PROGRAM MEMORY DEVICE is set to 'Y', the check sum is calculated as: The checksum formula for unprotected devices: SUM[0x0000:0x7FFF] + CONFIG1L & 0xFF + CONFIG1H & 0x27 + CONFIG2L & 0x0F + CONFIG2H & 0x0F + CONFIG3H & 0x01 + CONFIG4L & 0x01 The blank unsecured devices have checksum = 0x8146 The checksum formula for protected devices: CONFIG1L & 0xFF + CONFIG1H & 0x27 + CONFIG2L & 0xF + CONFIG2H & 0x0F + CONFIG3H & 0x01 + CONFIG4L & 0x01 + SUM_ID The blank secured devices have checksum = 0x0BF. For more, check the manufacturer's specifications. NOTE: On some windowed parts it is hard to erase security bits in the configuration data. Do not secure these parts if reusability is required. ************************************************************************ PIC18C658 PIC18C858 ---------- The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in bytes -------------- USER EPROM 0000 - 07FFF hex USER ID 200000 - 200007 hex CONFIG. WORD 300000 - 300006 hex DID 3FFFFE - 3FFFFF hex Blank state for Program memory :FF hex Blank state for user ID :FF hex Blank state for configuration data: CONFIG1L : FF hex; Address 300001 hex CONFIG1H : E7 hex; Address 300002 hex CONFIG2L : 0F hex; Address 300003 hex CONFIG2H : 0F hex; Address 300004 hex CONFIG4L : 03 hex; Address 300006 hex NOTE: Data at Address locations 300004 hex, 300005 hex and 300007 hex is zero. See manufacturers data sheet for details. Following information was copied from the following Microchip document(DS30475A-page 251.) This data is for reference ONLY, and may include errors. Please review Microchip's document for an exact reference. This data is NOT meant to be a substitute of the actual information available in "DS30475A-page 251" TABLE 22-1: CONFIGURATION BITS AND DEVICE ID’S ------------------------------------------------------------------------------ Memory |Data | | | | | | | | |Default | Address|Name |Bit7 |Bit6|Bit5 |Bit4|Bit3 |Bit2 |Bit1 |Bit0 |Value | -------|----------------------------------------------------------------------| 300000h|CONFIG1L |CP |CP |CP |CP |CP |CP |CP |CP |1111 1111| ------------------------------------------------------------------------------| 300001h|CONFIG1H |r |r |OSCSEN|- |- |FOSC2 |FOSC1 |FOSC0 |1110 0111| ------------------------------------------------------------------------------| 300002h|CONFIG2L |- |- |- |- |BORV1 |BORV0 |BODEN |PWRTEN|0000 1111| ------------------------------------------------------------------------------| 300003h|CONFIG2H |- |- |- |- |WDTPS2|WDTPS1|WDTPS0|WDTEN |0000 1111| ------------------------------------------------------------------------------| 300006h|CONFIG4L |- |- |- |- |- |- |r |STVREN|0000 0011| ------------------------------------------------------------------------------| 3FFFFEh| DEVID1 |DEV2 |DEV1|DEV0 |REV4|REV3 |REV2 |REV1 |REV0 |1111 1111| ------------------------------------------------------------------------------| 3FFFFFh| DEVID2 |DEV10|DEV9|DEV8 |DEV7|DEV6 |DEV5 |DEV4 |DEV3 |1111 1111| ------------------------------------------------------------------------------ Legend: x = unknown, u = unchanged, q = value depends on condition, r = reserved., - = unimplemented(unimplemented cells are read as ’0’.) The ID locations do not read-out in scrambled fashion after code protection is enabled. But it is recommended that ID location is written as "1111 bbbb" where "bbbb" is ID information. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. Without setting the Security Option the device will not be secured. Verify, blank check and program operations are not allowed on secured devices. The customer IDs and the Configuration bytes are always readable. Even on secured devices. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. At the end of the programming, even if the Security Option in the PROGRAM MEMORY DEVICE is set to 'Y', the check sum is calculated as: The checksum formula for unprotected devices: SUM[0x0000:0x7FFF] + CONFIG1L & 0xFF + CONFIG1H & 0x27 + CONFIG2L & 0x0F + CONFIG2H & 0x0F + CONFIG4L & 0x01 The blank unsecured devices have checksum = 0x8145 The checksum formula for protected devices: CONFIG1L & 0xFF + CONFIG1H & 0x27 + CONFIG2L & 0xF + CONFIG2H & 0x0F + CONFIG4L & 0x01 + SUM_ID The blank secured devices have checksum = 0x0BE. For more, check the manufacturer's specifications. NOTE: On some windowed parts it is hard to erase security bits in the configuration data. Do not secure these parts if reusability is required. ************************************************************************ PIC16C717 PIC16C770 --------- Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 007F hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 07FF hex CUSTOMER ID 2000 - 2003 hex CONFIG. WORD 2007 hex The Configuration Word should be included in your hex file. Always check the location 2007 hex (in words) if the Configuration word is present. In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1bbb bbbb" where "bbbb" is ID information. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured. Without setting the Security Option the device will not be secured. Positions of Protection (Security) bits in the Configuration word: bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ------------------------------------------------------------------------ '0' '0' CP CP D D CP CP '1' D D D D D D D CP are the protection bits. '1' is the reserved bit. Reads as '1'. D is a data bit as FOSC0, FOSC1,... Only LOAD operation is allowed on secured devices. When the device is secured,customer IDs and the Configuration Word are readable. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x0000 : 0x07FF] + CONFIG_WORD & 0x3F7F The blank unsecured devices have checksum = 0x377F The checksum formula for protected devices: CHECKSUM = CHECKSUM = CONFIG_WORD & 0x3F7F + SUM[IDs] For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). Data in the User's RAM should have format: 00bbbbbbbbbbbbbb where 'b' is data bit. Bits #14 and #15 should be '0's. ************************************************************************ PIC16C771 --------- Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 007F hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 0FFF hex CUSTOMER ID 2000 - 2003 hex CONFIG. WORD 2007 hex The Configuration Word should be included in your hex file. Always check the location 2007 hex (in words) if the Configuration word is present. In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1bbb bbbb" where "bbbb" is ID information. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured. Without setting the Security Option the device will not be secured. Positions of Protection (Security) bits in the Configuration word: bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ------------------------------------------------------------------------ '0' '0' CP CP D D CP CP '1' D D D D D D D CP are the protection bits. '1' is the reserved bit. Reads as '1'. D is a data bit as FOSC0, FOSC1,... Only LOAD operation is allowed on secured devices. When the device is secured,customer IDs and the Configuration Word are readable. The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x0000 : 0x0FFF] + CONFIG_WORD & 0x3F7F The blank unsecured devices have checksum = 0x2F7F The checksum formula for protected devices: CHECKSUM = CHECKSUM = CONFIG_WORD & 0x3F7F + SUM[IDs] For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). Data in the User's RAM should have format: 00bbbbbbbbbbbbbb where 'b' is data bit. Bits #14 and #15 should be '0's. ************************************************************************ PIC16C433 ----------- Blank state of User EPROM word: 3FFF hex Blank state of config word: 3FFF hex Blank state of ID word: 007F hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: in words -------------- USER EPROM 0000 - 07FE hex CALIBRATION WORD 07FF hex CUSTOMER ID 2000 - 2003 hex CONFIG. WORD 2007 hex Data for the eprom portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Example: 3A12 hex, 1C45 hex, 0A22 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For these devices it is recommended that ID location is written as "0011 1111 1bbb bbbb" where "bbbb" is ID information. The location 07FF hex is not blank on some OTP devices. It contains the oscillator parameters. In this case the location is not changed during the programming. It keeps the original value from the manufacturer. The Configuration Word should be included in your hex file. Always check the location 2007 hex (in words) if the Configuration word is present. Bits 4 and 5 of the configuration word are the security fuses. The options are as follows: 00 All memory is code protected. 01 Upper 3/4 of program memory code protected. 10 Upper 1/2 of program memory code protected. 11 Code protection off. On devices that use configuration bits 8-13, they are set by the algorithm according to what bits 4 and 5 are set to by the user. To secure the device, set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the device is secured using the value from the word at address 2007 hex in the Programmer User's RAM. Without setting the Security Option the device will not be secured. Positions of Protection (Security) bits in the Configuration word: bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 --------------------------------------------------------------------------- '0' '0' CP1 CP0 CP1 CP0 CP1 CP0 D CP1 CP0 D D D D D CP0, CP1 are the protection bits. D is a data bit as FOSC0, FOSC1,... When the device is ALL secured, only the Customer IDs and the Configuration Word are readable. VERIFY,BLANK-CHECK and PROGRAM DEVICE operations are not allowed on secured devices. At the end of the programming, even if the Security Option in the PROGRAM DEVICE is set to 'Y', the check sum is calculated from the whole array (SUM[0x0000 : 0x07FE] + CONFIG_WORD & 0x3FFF). The checksum is calculated by using Microchip's scheme where the ID is set to USER ENTRY. The checksum formula for unprotected devices: CHECKSUM = SUM[0x0000 : 0x07FE] + CONFIG_WORD & 0x3FFF The blank unsecured devices have checksum = 0xF800 The checksum formula for ALL protected devices: CHECKSUM = CONFIG_WORD & 0x3FFF + SUM[IDs] The checksum formula for 3/4 protected devices: CHECKSUM = SUM[0x0000 : 0x01FF] + CONFIG_WORD & 0x3FFF + SUM[IDs] The checksum formula for 1/2 protected devices: CHECKSUM = SUM[0x0000 : 0x03FF] + CONFIG_WORD & 0x3FFF + SUM[IDs] Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). For more check the manufacturer's specifications. NOTE: Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting Intel Intellec 8/MDS translator (code 83). NOTE: On some windowed parts it is hard to erase security bits in the configuration register. Do not secure these parts if reusability is required. ************************************************************************ PIC18F248 ------------ PIC18LF248 ------------ PIC18F258 ------------ PIC18LF258 ------------ PIC18F2455 ------------ PIC18LF2455 ------------ PIC18F2420 ------------ PIC18LF2420 ------------ PIC18F2520 ------------ PIC18LF2520 ------------ PIC18F2525 ------------ PIC18LF2525 ------------ PIC18F2553 ------------ PIC18LF2553 ------------ PIC18F2585 ------------ PIC18LF2585 ------------ PIC18F4680 ------------ PIC18LF4680 ------------ PIC18F6680 ------------ PIC18LF6680 ------------ PIC18F6720 ------------ PIC18LF6720 ------------ PIC18F8520 ------------ PIC18LF8520 ------------ *------ Data File Memory Map Partition versus Programmer's User RAM --------* Except for the EEPROM portion of the memory map, the device's memory map corresponds directly to data placed into the User's RAM of the programmer. For details on how to download the EEPROM portion of your target data file to the programmer's User RAM please refer to the following application note: ftp://ftp.dataio.com/appnotes/mct_multi_dwnld_9830736001.doc *------------------- Memory Map Partition ----------------------------------* Data in the programmer's User RAM is partitioned as follows: Code Memory Array (Bytes): 000000 -> (Code Memory Size -1) hex ID Location 1->8 (USER ID Bytes): 200000 -> 200007 hex Configuration words (CONFIGxx Bytes): 300000 -> 30000D hex Data EEPROM Array (Bytes): 400000 -> (Data EEPROM Size -1) hex PLEASE NOTE: The "Data EEPROM" data has a starting address of F00000 hex in data files generated in Microchip development environments. The UniFam family of Data I/O programmers will need to have this data downloaded to starting address 400000 hex in the Programmer's User RAM. Please refer to the memory map partition defined above for mapping the data file to the Programmer's User RAM. For details on Downloading data files for these PIC18Fxxxx devices please refer to the following application note: ftp://ftp.dataio.com/appnotes/mct_multi_dwnld_9830736001.doc To download the "mct_multi_dwnld_9830736001.doc" application note please copy and paste the above link into the address bar of your browser. *-------------- Configuration Bytes Programming ----------------------------* Configuration Bytes Programming is ONLY enabled if the: "Program configuration" flag is enabled (set to Yes.) *------------------- Protection --------------------------------------------* Protection flags are applied as follows: There are only three security options at this time: -- Security Fuse 1 = Boot Array Protection -- Security Fuse 2 = Main Array Protection (Block 0 -> Block n) -- Security Fuse 3 = Data EEPROM Array Protection *------------------- Blank state & Valid operations ------------------------* Blank state for Program memory, Data Memory and User ID: FF hex For the "Blank State" of the Configuration Bytes please refer to the manufacturer's specifications. Following device operations are NOT allowed on a protected/secured device: Verify, Blank Check, Illegal Bit Check, and Program (if the device operation does not include an Erased before Program operation.) *------------------- Checksum Operations -----------------------------------* The checksum is calculated by using Microchip's scheme as defined in the manufacturer's specifications. At the end of the programming, even if the Security Option(s) are enabled, the checksum is calculated as follows: Checksum Calculations Available: -- No Protection: SUM[Boot Block] + SUM[Main Array] + (CFGB_0 & CFGB_&_MASK_0) + (CFGB_1 & CFGB_&_MASK_1) + (CFGB_2 & CFGB_&_MASK_2) + .... + (CFGB_14 & CFGB_&_MASK_14) -- Boot Block Protection OR Boot Block & EEPROM Protection: SUM[Main Array] + (CFGB_0 & CFGB_&_MASK_0) + (CFGB_1 & CFGB_&_MASK_1) + (CFGB_2 & CFGB_&_MASK_2) + .... + (CFGB_14 & CFGB_&_MASK_14) + SUM_ID -- Boot Block & Main Array Protection OR Boot Block & Main Array & EEPROM Protection: (CFGB_0 & CFGB_&_MASK_0) + (CFGB_1 & CFGB_&_MASK_1) + (CFGB_2 & CFGB_&_MASK_2) + .... + (CFGB_14 & CFGB_&_MASK_14) + SUM_ID For more information please check the manufacturer's specifications. ************************************************************************ NOTE: Support information for UniFam V7.5 software update (and greater): PIC18F2220 ------------ PIC18F2320 ------------ PIC18F242 ------------ PIC18F252 ------------ PIC18F442 ------------ PIC18F452 ------------ PIC18F458 ------------ PIC18LF2220 ------------ PIC18LF2320 ------------ PIC18LF242 ------------ PIC18LF252 ------------ PIC18LF442 ------------ PIC18LF452 ------------ PIC18LF458 ------------ *------ Data File Memory Map Partition versus Programmer's User RAM --------* Except for the EEPROM portion of the memory map, the device's memory map corresponds directly to data placed into the User's RAM of the programmer. For details on how to download the EEPROM portion of your target data file to the programmer's User RAM please refer to the following application note: ftp://ftp.dataio.com/appnotes/mct_multi_dwnld_9830736001.doc *------------------- Memory Map Partition ----------------------------------* Data in the programmer's User RAM is partitioned as follows: Code Memory Array (Bytes): 000000 -> (Code Memory Size -1) hex ID Location 1->8 (USER ID Bytes): 200000 -> 200007 hex Configuration words (CONFIGxx Bytes): 300000 -> 30000D hex Data EEPROM Array (Bytes): 400000 -> (Data EEPROM Size -1) hex PLEASE NOTE: The "Data EEPROM" data has a starting address of F00000 hex in data files generated in Microchip development environments. The UniFam family of Data I/O programmers will need to have this data downloaded to starting address 400000 hex in the Programmer's User RAM. Please refer to the memory map partition defined above for mapping the data file to the Programmer's User RAM. *-------------- Configuration Bytes Programming ----------------------------* Configuration Bytes Programming is ONLY enabled if the: "Program configuration" flag is enabled (set to Yes.) *------------------- Protection --------------------------------------------* Protection flags are applied as follows: There are only three security options at this time: -- Security Fuse 1 = Boot Array Protection -- Security Fuse 2 = Main Array Protection (Block 0 -> Block n) -- Security Fuse 3 = Data EEPROM Array Protection *------------------- Blank state & Valid operations ------------------------* Blank state for Program memory, Data Memory and User ID: FF hex For the "Blank State" of the Configuration Bytes please refer to the manufacturer's specifications. Following device operations are NOT allowed on a protected/secured device: Verify, Blank Check, Illegal Bit Check, and Program (if the device operation does not include an Erased before Program operation.) *------------------- Checksum Operations -----------------------------------* The checksum is calculated by using Microchip's scheme as defined in the manufacturer's specifications. At the end of the programming, even if the Security Option(s) are enabled, the checksum is calculated as follows: Checksum Calculations Available: -- No Protection: SUM[Boot Block] + SUM[Main Array] + (CFGB_0 & CFGB_&_MASK_0) + (CFGB_1 & CFGB_&_MASK_1) + (CFGB_2 & CFGB_&_MASK_2) + .... + (CFGB_14 & CFGB_&_MASK_14) -- Boot Block Protection OR Boot Block & EEPROM Protection: SUM[Main Array] + (CFGB_0 & CFGB_&_MASK_0) + (CFGB_1 & CFGB_&_MASK_1) + (CFGB_2 & CFGB_&_MASK_2) + .... + (CFGB_14 & CFGB_&_MASK_14) + SUM_ID -- Boot Block & Main Array Protection OR Boot Block & Main Array & EEPROM Protection: (CFGB_0 & CFGB_&_MASK_0) + (CFGB_1 & CFGB_&_MASK_1) + (CFGB_2 & CFGB_&_MASK_2) + .... + (CFGB_14 & CFGB_&_MASK_14) + SUM_ID For more information please check the manufacturer's specifications. ************************************************************************ NOTE: The Following information applies to supports Released previous to the UniFam V7.5 update: PIC18F242 ------------ PIC18F252 ------------ PIC18F442 ------------ PIC18F452 ------------ PIC18LF242 ------------ PIC18LF252 ------------ PIC18LF442 ------------ PIC18LF452 ------------ The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: Memory in bytes Memory in bytes PIC18F242/PIC18F442 PIC18F252/PIC18F452 --------------------- --------------------- PIC18LF242/PIC18LF442 PIC18LF252/PIC18LF452 --------------------- --------------------- USER FLASH 0000 - 03FFF hex 0000 - 07FFF hex USER ID 200000 - 200007 hex 200000 - 200007 hex CONFIG. WORD 300000 - 30000D hex 300000 - 30000D hex DID 3FFFFE - 3FFFFF hex 3FFFFE - 3FFFFF hex DATA EEPROM 400000 - 4000FF hex 400000 - 4000FF hex Blank state for Program memory :FF hex Blank state for User ID :FF hex Blank state for Configuration Bytes: CONFIG1L : 00 hex CONFIG1H : 27 hex CONFIG2L : 0F hex CONFIG2H : 0F hex CONFIG3L : 00 hex CONFIG3H : 01 hex CONFIG4L : 85 hex CONFIG4H : 00 hex CONFIG5L : 0F hex CONFIG5H : C0 hex CONFIG6L : 0F hex CONFIG6H : E0 hex CONFIG7L : 0F hex CONFIG7H : 40 hex The ID locations do not read-out in scrambled fashion after code protection is enabled. But it is recommended that ID location is written as "1111 bbbb" where "bbbb" is ID information. To program the data memory, select option Program XNOR Data in the Program Memory Device Options screen. This memory maps at 400000-4000FF hex in the user ram. Configuration bits programming may be enabled in the Program Memory Device Options screen. If this option is enabled, configuration words CONFIG4 to CONFIG7 are programmed as per the values in user RAM. The other CONFIG words are programmed along with the other memory blocks. To secure the device, set the Configuration Option in the PROGRAM MEMORY DEVICE to 'Y'. Without setting the Security Option the device will not be secured. If this option is enabled, configuration words CONFIG4 to CONFIG7 are programmed as per the values in user RAM. Please refer to datasheet for the significance of the configuration words. The other CONFIG words are programmed along with the other memory block. Verify, blank check and program operations are not allowed on secured devices. The customer IDs and the Configuration bytes are always readable. Even on secured devices. The checksum*(Please refer note)is calculated by using Microchip's scheme where the ID is set to USER ENTRY. At the end of the programming, even if the Security Option in the PROGRAM MEMORY DEVICE is set to 'Y', the check sum is calculated as: The checksum formula for unprotected devices: SUM(0000:01FF)+SUM(0200:1FFF)+SUM(2000:3FFF)+SUM(4000:5FFF)+ SUM(6000:7FFF)+(CONFIG0 & 0000)+(CONFIG1 & 0027)+(CONFIG2 & 000F) +(CONFIG3 & 000F)+(CONFIG4 & 0000)+(CONFIG5 & 0001)+(CONFIG6 & 0085) +(CONFIG7 & 0000)+(CONFIG8 & 000F)+(CONFIG9 & 00C0)+(CONFIG10 & 000F)+(CONFIG11 & 00E0)+(CONFIG12 & 000F)+(CONFIG13 & 0040) The checksum formula for all protected devices: (CONFIG0 & 0000)+(CONFIG1 & 0027)+(CONFIG2 + 000F)+(CONFIG3& 000F)+ (CONFIG4 & 0000)+(CONFIG5 & 0001)+(CONFIG6 & 0085)+(CONFIG7 & 0000)+ (CONFIG8 & 000F)+(CONFIG9 & 00C0)+(CONFIG10 & 000F)+(CONFIG11 & 00E0)+ (CONFIG12 & 000F)+(CONFIG13 & 0040)+SUM(IDs) For more, check the manufacturer's specifications. * Note: Valid microchip checksum is available after Read, Verify operations ************************************************************************ PIC16F72 ------------- PIC16LF72 ------------- PIC16F73 (V7.8 Beta & greater) ------------- PIC16LF73 (V7.8 Beta & greater) ------------- PIC16F716 ------------- PIC16LF716 ------------- Blank state of each Word of User Program Memory: 3FFF hex Blank state of each Word of ID Memory: 3FFF hex Blank state of the Configuration Word: 3FFF hex The device memory map corresponds directly to the User's RAM. Data in the programmer's User Memory is partitioned as follows: User Program Memory Address Range: 0000 -> 07FF hex (PIC16F72/PIC16F716) User Program Memory Address Range: 0000 -> 0FFF hex (PIC16F73) ID Memory Address Range: 2000 -> 2003 hex Configuration Word Address Range: 2007 hex Data for the flash portion of the memory in the User's RAM should have format: 00bbbbbbbbbbbbbb binary where 'b' is data bit. Bits #14 and #15 should be '0's. Examples: 3A12 hex, 1C45 hex, 0A22 hex Data for the EEPROM portion of the memory (data memory) in the User's RAM should have the format: 00000000bbbbbbbb binary where 'b' is data bit. Bits from #8 to #15 should be '0's. Examples: 0012 hex, 00A1 hex, 00F1 hex In some devices, the ID locations read-out is in scrambled fashion after code protection is enabled. For this reason Microchip recommends that the ID location data be written as "0011 1111 1000 bbbb" where "bbbb" is the ID data. Check if the Configuration Word is included in your hex file. This can be done by downloading the data file into the programmer and checking the Programmer's User RAM at address locations 2007 hex. To secure the "User Program Memory" in the device, enable the "Program security fuse 1" flag. The Verfy, Blank Check, and Illegal Bit Check operations are not allowed on secured devices. The customer IDs(ID Memory) and the Configuration Word are always readable, regarless of the security set on the device. The checksum is calculated by using Microchip's CheckSum scheme: The checksum formula for Un-Protected Devices(PIC16F72): CHECKSUM = SUM[0x0000 : 0x07FF] + (Configuration_Word & 0x005F) The blank unsecured devices have checksum = 0xF85F The checksum formula for Un-Protected Devices(PIC16F716): CHECKSUM = SUM[0x0000:0x7FF] + (Configuration_Word & 0x20CF) The blank unsecured devices have checksum = 0x18CF Please see the manufacturer's specifications for further information regarding Microchip's CheckSum scheme. Use output option which produces merged 8 bit Intellec Hex object file (INHX8M) then download to programmer by selecting either "Intel Intellec 8/MDS translator (foramt code 83)" or Intel Hex 32(format code 99). For futher device specific information please consult the manufacturer's data sheet and/or programming specifications. ************************************************************************ ************************************************************************