This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problems with using a C167 code on a XC164

I wrote a code for the C167 which I want to use with a XC164, but I got lots of error messages as I compiled the code and now I don't have any more ideas to solve this problem...

Beside changing the device to XC164CS and the .h-file to XC164.h, what else I have to take care about?

Some error-examples:

PPF_3.C(35): error C67: 'P1': undefined identifier

corresponding code (beneath include-files)

sbit L2_1 = P1^6;

or

PPF_3.C(302): error C67: 'T3CON': undefined identifier

corresponding code (in main)
T3CON=0x0003;


Thanks in advance!

Parents
  • Generally speaking, if the compiler tells you that something is undefined, maybe it IS REALLY undefined.... :-)
    Take a look at the include files XC164.H and REG167.H: peripheral names have been changed, according to the new naming method adopted by Infineon (as stated in Infineon manual).
    Thus you have to change the names into your source file: i.e. T3CON in C16x becomes GPT12E_T3CON in XC16x.
    Another solution would be

    #define T3CON GPT12E_T3CON

Reply
  • Generally speaking, if the compiler tells you that something is undefined, maybe it IS REALLY undefined.... :-)
    Take a look at the include files XC164.H and REG167.H: peripheral names have been changed, according to the new naming method adopted by Infineon (as stated in Infineon manual).
    Thus you have to change the names into your source file: i.e. T3CON in C16x becomes GPT12E_T3CON in XC16x.
    Another solution would be

    #define T3CON GPT12E_T3CON

Children