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!
error 318: can't open file XC167.h
"error 318: can't open file XC167.h" So, you got an error saying that a header file couldn't be found, and then you got errors about undefined identifiers...! "Doh!" Yes, I think you deserve a Homer Simpson award here...! ;-) But you know what to do now, don't you...?
Hello again. I am not sure how to sort this, I know I need XC167.H file and think I have copied it but it says I need XC16x.H which I dont have. May even be going entirely in wrong direction. Can anyone help?
"it says I need XC16x.H which I dont have." it's on the free CD. (I don't use C166 - so that's where I found it). Have you tried the free download? "I have copied it" Shouldn't it just be part of the standard installation? You shouldn't need to be copying anything?