Go to Post The stated goals of FIRST are to inspire a culture that values science and technology. Inspiration needs Motivation. What motivates people? Competition. - Dmentor [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 29-01-2007, 23:25
Danny Diaz's Avatar
Danny Diaz Danny Diaz is offline
Smooth Operator
AKA: FrankenMentor
None #0418
Team Role: Alumni
 
Join Date: Apr 2005
Rookie Year: 2003
Location: Manchester, NH
Posts: 545
Danny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond repute
Send a message via AIM to Danny Diaz
Programming Analog Input from 2004 Controller

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
__________________
Danny Diaz
Former Lead Technical Mentor, FRC 418
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FRC analog input RC filter values Gdeaver Control System 2 01-01-2006 22:03
Analog and digital input question Robby Control System 7 30-04-2005 20:07
Analog Input Trouble Matt Krass Programming 10 20-01-2005 21:09
Resistance to Analog Input Value. Josh Hambright Electrical 12 15-04-2003 16:12
DC Motor current to an Analog Input junkyarddawg Motors 43 04-04-2002 15:53


All times are GMT -5. The time now is 11:29.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi