I am trying to use the second serial port and have been trying to use the example from http://www.keil.com/support/docs/2601.htm I get the error 67 undefined identifier. Any body know how I can get rid of this. Thanks
"I get the error 67 undefined identifier. Any body know how I can get rid of this." Supply a suitable definition for the identifier in question, of course!
If I knew how to do that in this case I would have, unfortunatley I dont and that is why I asked.
IF you don't know, how is anyone else supposed to know?! You haven't even said which identifier is undefined, nor where the error occurs!
Fair enough, ASC1_TIC ASC1_RIC ASC1_BG ASC1_CON ALTSEL0P3 I think they may have been defined like #define ASCx_TBUF ASC1_TBUF #define ASCx_RBUF ASC1_RBUF #define ASCx_RIC_IR ASC1_RIC_IR #define ASCx_TIC_IR ASC1_TIC_IR Doesn't seem to work. Prob something ive done.
They should be SFR definitions in XC16X.h Are you sure there weren't also other errors and/or warnings that you have omitted to mention?
You are compiling for XC161 or XC167, aren't you? The special function register definitions for ASC1 in the file XC16X.H are braced with the following ifdefs:
#if defined (__XC161_H__) || defined (__XC167_H__) ... #endif
I changed the library to; #include <reg167.h> This is probably why. I changed this as it could not find the, #include <XC167.H> Take it I shouldn't have. Doh!
View all questions in Keil forum