hi everyone. I’ve been working on integrating code for the gyro/adc into the default camera stuff, but after I’ve made sure I’ve done everything the two readmes (from kevins’ frc_gyro and frc_adc) tell me to do, mplab tells me that in user_routines_fast.c there are several unknown members. here’s the error list below
frc_camera_gyro\user_routines_fast.c:91:Error [1205] unknown member ‘TMR2IF’ in ‘__tag_126’
C:\frc_camera_gyro\user_routines_fast.c:91:Error [1205] unknown member ‘TMR2IE’ in ‘__tag_125’
C:\frc_camera_gyro\user_routines_fast.c:91:Error [1124] scalar operands expected for ‘&&’ operator
C:\frc_camera_gyro\user_routines_fast.c:96:Error [1205] unknown member ‘ADIF’ in ‘__tag_126’
C:\frc_camera_gyro\user_routines_fast.c:96:Error [1205] unknown member ‘ADIE’ in ‘__tag_125’
C:\frc_camera_gyro\user_routines_fast.c:96:Error [1124] scalar operands expected for ‘&&’ operator
C:\frc_camera_gyro\user_routines_fast.c:98:Error [1205] unknown member ‘ADIF’ in ‘__tag_126’
C:\frc_camera_gyro\user_routines_fast.c:98:Error [1131] type mismatch in assignment
C:\frc_camera_gyro\user_routines_fast.c:116:Warning [2058] call of function without prototype
C:\frc_camera_gyro\user_routines_fast.c:116:Error [1117] scalar type expected in ‘if’ statement
C:\frc_camera_gyro\user_routines_fast.c:116:Error [1117] scalar type expected in ‘if’ statement
C:\frc_camera_gyro\user_routines_fast.c:176:Warning [2058] call of function without prototype
anyone have any ideas? I know java, but I’m kind of in the dark with c, so any help is greatly appreciated.
I started with the camera “bells and whistles” version.
now, because this header file is enclosed between < >, that means it’s the compiler’s problem to include it, right? or do I have to actually add it to the project file list? I’ve tried both, just adding the #include part to user_routines_fast.c, trying with both the < > and " " signs, and I also tried actually adding the p18f8722.h while using < > and " ". none of it worked. are there other source files I need to add the #include <p18f8722.h> line to besides user_routines_fast.c? or is that even the source file you were talking about in the first place?
well, I already had that, and I know it was working because when I deleted it in order to test that it actually was working the compiler stopped almost immediately and said it couldn’t find stdio.h. my compiler is set up to halt on the first failure, if that makes any difference.
Try going to *Project > Set Language Tool Locations > Microchip C18 Toolsuite > Default Search Paths & Directories > Include Search Path *What this is providing is the location for it to search for all the compiler includes (the ones in between <>)
Mine is by default nothing, but your system may be set up differently. I’m guessing here, but I would try setting C:\mcc18\h as the location.
sorry, but I haven’t been able to post for a bit. it turns out that my prob was that I had a typo. the mentor that’s helping me out noticed that after we were going over the code. it wasn’t a mispelled word, I just had a 3 in a variable name when there was supposed to be a 1. however, I did still need that p18f8722.h file, so thanks for that, kevin. next time I have a prob, I’ll make sure I don’t have any typos before I post.