porting camera code to 2005 bot controller

We’d like to port the camera code to the 2005 controller so that we can work on it during the upcoming windows starting March 6. I’ve started that, but ran into the camera serial port shtuff. Any suggestions on the “easy” approach? There has to be code for the ttl serial port for the 2005 controller, right? Is is better to modify that or squeeze the 2006 shtuff into there? Any other suggestions?

I believe the only thing you have to do is change the target microprocessor in MPLab and change the library and linker files as specified in one of the text files included with the default code. I ported code the other way (2005 controller to 2006 controller) early in build season and I don’t remember having to change anything else.

The code should run just fine on the 2005 RC. Follow the directions in the “Using_Last_Years_FRC.txt” file that I included in the build directory.


There are still 3 errors. It looks like a struct definition member needs to be defined. The errors are below.

C:\Microchip\First_Code\fVersion_05\serial_ports.c:387:Error [1205] unknown member ‘SENDB’ in ‘__tag_100’
C:\Microchip\First_Code\fVersion_05\serial_ports.c:387:Error [1131] type mismatch in assignment
C:\Microchip\First_Code\fVersion_05\serial_ports.c:481:Error [1205] unknown member ‘ADDEN’ in ‘__tag_4’
C:\Microchip\First_Code\fVersion_05\serial_ports.c:481:Error [1131] type mismatch in assignment
C:\Microchip\First_Code\fVersion_05\serial_ports.c:520:Error [1205] unknown member ‘SENDB’ in ‘__tag_8’
C:\Microchip\First_Code\fVersion_05\serial_ports.c:520:Error [1131] type mismatch in assignment

Clean your intermediate (.o files). Project menu -> Clean or manually delete them. That works sometimes, usually after you make many changes and MPLAB is too stupid to update the files.

Thanks for taking the time to help but that was not it. I tried it, but I had started from a fresh directory with no .o files in it. Either way, the error occurs.

It appears to be a struct defined in the 18f8722 chip and not the 18f8520 chip, more to research I suppose. I was hoping to have it ready for the kids when our next window occurs, but I suppose that will have to wait til then.

Be advised that my students followed the directions in the “Using_Last_Years_FRC.txt” file and it worked just fine.