Danny Diaz
29-01-2007, 23:25
Hey all.
This year we've finally got enough people interested in programming to have 2 subteams programming this year, and we're all stoked. One team is currently going to town on the camera and autonomous code with this year's 2007 controller, and the other team is learning how to program almost from the ground up on a 2004 controller. We don't have the old version of MPLAB or the C18 compiler to use with the 2004 controller, but the new versions of the software can compile for the old controller.
This is all fine and dandy, but we cannot find one source code package for the 2004 and/or 2005 controllers that actually compiles straight out of the box. The 2004 and 2005 default code won't compile because they're missing the adc code, and Kevin's 2005 code with adc improvements doesn't compile because it's missing a bunch of files too. We combined Kevin's 2005 adc code (just copied the adc modules, hooked in the interrupt handler, etc...) into the 2005 default code and was finally able to make a version of the code that compiles and runs. However, the values we get back from the analog inputs are really noisy, meaning if we get back a 10-bit number like "842" from an analog input, it is sometimes "84" and sometimes "8" instead of getting the full number "842". At first I thought it was a printing issue (error in flushing the buffer and such) but it's got to be a data stomping issue in the interrupt handler because the values really are getting whacked.
Is there any code out there that is "default code" that includes all of the files necessary to actually compile it (with adc modules for analog input) for the 2004 or 2005 controllers? We ran the default 2007 code with some mods on the 2007 controllers and everything works really nice and smooth, but for the life of us we cannot get anything going on the 2004 controller with any code from 2004 or 2005.
Thanks for any help you can provide!
-Danny
This year we've finally got enough people interested in programming to have 2 subteams programming this year, and we're all stoked. One team is currently going to town on the camera and autonomous code with this year's 2007 controller, and the other team is learning how to program almost from the ground up on a 2004 controller. We don't have the old version of MPLAB or the C18 compiler to use with the 2004 controller, but the new versions of the software can compile for the old controller.
This is all fine and dandy, but we cannot find one source code package for the 2004 and/or 2005 controllers that actually compiles straight out of the box. The 2004 and 2005 default code won't compile because they're missing the adc code, and Kevin's 2005 code with adc improvements doesn't compile because it's missing a bunch of files too. We combined Kevin's 2005 adc code (just copied the adc modules, hooked in the interrupt handler, etc...) into the 2005 default code and was finally able to make a version of the code that compiles and runs. However, the values we get back from the analog inputs are really noisy, meaning if we get back a 10-bit number like "842" from an analog input, it is sometimes "84" and sometimes "8" instead of getting the full number "842". At first I thought it was a printing issue (error in flushing the buffer and such) but it's got to be a data stomping issue in the interrupt handler because the values really are getting whacked.
Is there any code out there that is "default code" that includes all of the files necessary to actually compile it (with adc modules for analog input) for the 2004 or 2005 controllers? We ran the default 2007 code with some mods on the 2007 controllers and everything works really nice and smooth, but for the life of us we cannot get anything going on the 2004 controller with any code from 2004 or 2005.
Thanks for any help you can provide!
-Danny