************************************************************************ ************************************************************************ ** ** ** Application notes for NATIONAL Microcontrollers ** ** (Informal Document) ** ** ** ** To find the application notes for your device search for the ** ** 'core' part name. As an example using the COP8SAA716 16 pin SOIC ** ** you would search on 'COP8SAA' ** ** ** ************************************************************************ ************************************************************************ **************************************************************************** COP8SAA716 ----------- COP8SAA720 ----------- COP8SAA728 ----------- COP8SAB720 ----------- COP8SAB728 ----------- COP8SAC720 ----------- COP8SAC728 ----------- COP8SAC740 ----------- COP8SAC744 ----------- COP8SGE728 ----------- COP8SGE740 ----------- COP8SGE744 ----------- COP8SGR728 ----------- COP8SGR740 ----------- COP8SGR744 ----------- The following Table describes the addresses(memory map) of where data is located in the programmer's User RAM for the UniFam Programmers. ----------------------------------------------------------------------------- |Device family | Main Array Addresses | ECON Register Address | UES Addresses | |--------------|----------------------|-----------------------|---------------| |COP8SAA | 0000 hex -> 03FF hex | 0400 hex | 0401 -> 0408 | |--------------|----------------------|-----------------------|---------------| |COP8SAB | 0000 hex -> 07FF hex | 0800 hex | 0801 -> 0808 | |--------------|----------------------|-----------------------|---------------| |COP8SAC | 0000 hex -> 0FFF hex | 1000 hex | 1001 -> 1008 | |--------------|----------------------|-----------------------|---------------| |COP8SGE | 0000 hex -> 1FFF hex | 2000 hex | 2001 -> 2008 | |--------------|----------------------|-----------------------|---------------| |COP8SGR | 0000 hex -> 7FFF hex | 8000 hex | 8001 -> 8008 | ----------------------------------------------------------------------------- **************************************************************************** CR16MFS944V8-NIS (NIS means no ISP memory modification) ---------------- CR16MHS944V7-NIS (NIS means no ISP memory modification) ---------------- CR16MFS944V8-IS (IS means ISP memory can be modified) --------------- CR16MHS944V8-IS (IS means ISP memory can be modified) --------------- Package: 44 pin PLCC Algorithm type "NIS": ISP memory is not read, verified, programmed or erased. The exception are the two last bytes of the ISP memory (DFFE - DFFF hex). Algorithm type "-IS" : ISP memory can be read, verified, programmed or erased. Blank state of flash EPROM/EEPROM word: FFFF hex Blank state of flash EPROM/EEPROM byte: FF hex The device memory map (as seen by the processor core) corresponds directly to the User's RAM. Data in the programmer's User Memory is arranged in the way as the processor core sees it: memory block in bytes in words ------------- -------------- --------------- FLASH PROGRAM MEMORY 0000 - BFFF hex 0000 - 5FFF hex BOOT ROM (ISP MEMORY) DA00 - DFFD hex 6D00 - 6FFE hex (not in "NIS" alg.) PROGRAM ROM CONTROL/STATUS DFFE - DFFF hex 6FFF hex EEPROM DATA MEMORY F000 - F27F hex 7800 - 793F hex There are two special bits in PROGRAM ROM CONTROL/STATUS locations that can influence the memory accessibility. Pay special attention to this location. This location is readable even if the device is secured. To check if the device is secured, read the device and check this location in the programmer's user RAM. The byte at the location DFFF hex (high byte of the word at 6FFFh ) has special bits FROMRD and FROMWR. When "Edit data word width" equal to 8 (data is diplayed in bytes), the security byte is located at DFFF hex in the programmer's User Memory. bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 --------------------------------------------------------------- 'R' 'R' 'R' 'R' 'R' FROMWR 'R' FROMRD When "Edit data word width" equal to 16 (data is diplayed in words), the security byte is located in high byte of the word at location 6FFF hex in the programmer's User Memory. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 --------------------------------------------------------------- 'R' 'R' 'R' 'R' 'R' FROMWR 'R' FROMRD Bits marked as 'R' are reserved bits and the user's datafile should contain '1's at these bit positions. The blank state of these bits is '1' (when the device is erased). In this case these bits do not have any influence on the memory access. When bit FROMRD (bit #0) is programmed to '0', the programmer can not read or verify the FLASH PROGRAM MEMORY. The Boot/ISP ROM can not be bulk erased. When bit FROMWR (bit #2) is programmed to '0', the programmer can only read or verify the device. The Boot/ISP ROM can not be bulk erased. The PROGRAM ROM CONTROL/STATUS word should be included in your hex file. Always check the location 6FFF hex high byte (in words) or the location DFFF hex (in bytes) if the PROGRAM ROM CONTROL/STATUS data is present. If the bit #0, #1 or both have '0' value, the user wants to program these locations. In this case set the Security Option in the PROGRAM MEMORY DEVICE to 'Y'. After programming the device with this option enabled, the FROMWR and FROMRD bits are programmed using the value from PROGRAM ROM CONTROL/STATUS location in the programmer's User Memory (6FFF hex, high byte if in words or DFFF hex if in bytes). Other bits of the PROGRAM ROM CONTROL/STATUS can be programmed without setting the Security Option. Example how words in the programmer's User Memory are arranged: word = 0102h where 01h is the hi-byte and 02 is the low byte If the data word 0102h resides at address 0000h and data word width is equal to 8 the data byte 01h will reside at 0001h address and 02h data byte will reside at 0000h address. bytes = 02h, 01h To see data in the programmer's User Memory as words go to EDIT PROGRAMMER MEMORY screen and make the field "Edit data word width" equal to 16 (default). Then hit ENTER on the keyboard. To see data in the programmer's User Memory as bytes go to EDIT PROGRAMMER MEMORY screen and make the field "Edit data word width" equal to 8. Then hit ENTER on the keyboard. The programmes shows that the Device Block Size equals to 7D00 hex words. This number includes all bytes (words) in the high endurance Data Memory. The actual size of this memory is 500 hex words. For more information check the manufacturer's specifications. ************************************************************************ ************************************************************************ CR16MCS9VJE7-NIS (NIS means no ISP memory modification) ---------------- CR16MCS9VJE8-NIS (NIS means no ISP memory modification) ---------------- CR16MCS9VJE7-IS (IS means ISP memory can be modified) --------------- CR16MCS9VJE8-IS (IS means ISP memory can be modified) --------------- Package: 80 pin QFP Algorithm type "-NIS": BOOT/ISP memory is not read, verified, programmed or erased. The exception are the last two words (4 bytes) of the ISP memory (72FEh and 72FFh). These locations can be read, programmed and verified. They can not be erased. More about these special locations below. Algorithm type "-IS" : The entire BOOT/ISP memory can be read, verified, programmed or erased. Blank state of flash EPROM/EEPROM word: FFFF hex Blank state of flash EPROM/EEPROM byte: FF hex The device memory map (as seen by the processor core) corresponds directly to the User's RAM. Data in the programmer's User Memory is arranged in the way as the processor core sees it: memory block in bytes in words ------------- -------------- --------------- FLASH PROGRAM MEMORY #1 0000 - BFFF hex 0000 - 5FFF hex BOOT/ISP MEMORY E000 - E5FB hex 7000 - 72FD hex (not in "NIS" alg.) PROGRAM ROM CONTROL (word #1) E5FC - E5FD hex 72FE hex PROGRAM ROM CONTROL (word #2) E5FE - E5FF hex 72FF hex (disables erase !!) LOW ENDURANCE DATA MEMORY E800 - EFFF hex 7400 - 77FF hex HIGH ENDURANCE DATA MEMORY F000 - F07F hex 7800 - 783F hex FLASH PROGRAM MEMORY #2 1C000 - 1FFFF hex E000 - FFFF hex There are four special bytes (two words) at the end of the BOOT/ISP memory: Location E5FCh if in bytes (low byte of location 72FEh if in words): bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 --------------------------------------------------------------- 'S' 'S' 'S' 'S' 'S' 'S' 'S' 'S' Location E5FDh if in bytes (high byte of location 72FEh if in words): bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 --------------------------------------------------------------- 'R' 'S' 'S' 'S' 'S' 'S' 'S' 'S' Location E5FEh if in bytes (low byte of location 72FFh if in words): bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 --------------------------------------------------------------- 'S' 'S' 'S' 'R' 'R' 'R' 'S' 'S' Location E5FFh if in bytes (high byte of location 72FFh if in words): bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 --------------------------------------------------------------- 'S' 'S' 'S' 'S' 'S' 'S' 'S' 'S' Bits marked as 'S' will be programmed to the desired values only if the Security Option field in the PROGRAM MEMORY DEVICE screen is set to 'Y'. The desired value of those bits can be found in the programmer's User Memory at locations E5FCh to E5FFh if in bytes or 72FEh to 72FFh if in words. Bits marked as 'R' are reserved bits and the user's datafile should contain '1's at these bit positions. Be carefull with these special bytes (words). Programming them with incorrect values can limit the device memory access. These locations are readable even on secured devices. Before the programming, check locations E5FCh to E5FFh (if in bytes) or 72FEh to 72FFh (if in words) in the programmer's User Memory if the correct data is present. Example how words in the programmer's User Memory are arranged: word = 0102h where 01h is the hi-byte and 02 is the low byte If the data word 0102h resides at address 0000h and data word width is equal to 8 the data byte 01h will reside at 0001h address and 02h data byte will reside at 0000h address. bytes = 02h, 01h To see data in the programmer's User Memory as words go to EDIT PROGRAMMER MEMORY screen and make the field "Edit data word width" equal to 16 (default). Then hit ENTER on the keyboard. To see data in the programmer's User Memory as bytes go to EDIT PROGRAMMER MEMORY screen and make the field "Edit data word width" equal to 8. Then hit ENTER on the keyboard. The programmes shows that the Device Block Size equals to 7D00 hex words. This number includes all bytes (words) in the high endurance Data Memory. The actual size of this memory is 500 hex words. For more information check the manufacturer's specifications. ************************************************************************ ************************************************************************