View Single Post
  #13   Spotlight this post!  
Unread 08-02-2008, 01:12
sfs sfs is offline
Software Engineer
AKA: Steve Siirila
FRC #2220 (Blue Twilight)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Eagan, MN
Posts: 28
sfs is an unknown quantity at this point
Re: New C18 3.0+ Compatible FRC Code

I just tried to build the ifi_frc_sensor project with MPLAB IDE v7.20 and C18 2.4 (had to use the project wizard to create new mcp/mcw files, as I was unable to open the ones that came with). After updating the ifi_frc.h header file to define the proper compiler macro (USE_C18_24), I now am getting these errors:

timers.c:72:Error [1205] unknown member 'PSA' in '__tag_216'
timers.c:72:Error [1131] type mismatch in assignment

Apparently the header file mcc18\p18f8722.h defines T0CON bit 3 as T0PS3, but the timers.c file references it as 'PSA' instead. Should the code read:

#ifdef USE_C18_24
T0CONbits.T0PS3 = 1;
#else
T0CONbits.PSA = 1;
#endif

??