When you program the on-chip Flash memory for the first time, you can use any values for the ID code. The ID matching will succeed. (When using the M16C Flash Starter, you always need to enter an ID code.)
If you have programmed the on-chip Flash memory already, a value written in the following addresses (including FFh, 00h) becomes the ID code.
When the ID code is unknown, please check the following addresses of your program written in the on-chip Flash memory. Usually MOT suffix file of Motorola S format file or HEX suffix file of Intel HEX format.
Addresses to be checked in M16C/10, M16C/20, M16C/Tiny, M16C/60 Series
Addresses to be checked in M16C/80, M32C/80 Series
Addresses to be checked in R8C Family
Addresses to be checked in 38000/740 Series
In M16C Family, if nothing exists in these addresses in the program, "00h" or "FFh" becomes the ID code. The cases where no data exists are the following two. In 38000/740 series, as with Case 1 below, "FFh" becomes the ID code. (ID code is not in the vector table area but in the data area in 38000/740 Series.)
Case 1: No vector table is made
In this case, no data is set in MOT or HEX file because the ID code is saved in the highest order address in the vector table. However, Flash memory programmers often have a default value in free space. If so, the default value becomes the ID code. When using the M16C Flash Starter, the default value is "FFh" and the ID code thus is "FFh".
Case 2: When no value is set in the above addresses
In this case, the addresses and data are set by .lword. Since the ID code is saved in the highest order address in the vector table, ID code is "00h".
Additionally, you can set an ID code with the compiler (lmc30) using -ID option. However, 38000/740 Series does not support Imc30.
1. When specifying -ID option only:
ID code is "FFh".
2. When not using -ID option:
Values written in the above ID code store addresses become an ID code.
For details, please refer to the section "Method for Operating lmc30" in the AS30 User's Manual.
|R8C/34E, R8C/34F, R8C/34G, R8C/34H|
|R8C/36E, R8C/36F, R8C/36G, R8C/36H|
|R8C/38E, R8C/38F, R8C/38G, R8C/38H|
|M16C/6NK, M16C/6NL, M16C/6NM, M16C/6NN|
|SDK-PLC-EU-A (or -B for CENELEC B band)|