View Single Post
  #183   Spotlight this post!  
Unread 12-01-2008, 15:09
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: New C18 3.0+ Compatible FRC Code

Quote:
Originally Posted by NetElemental View Post
Kevin,
Thanks - we already had #include <adc.h>, it seemed to come like that. Our mcc18 adc.h file actually did not have a definition for ADC_15ANA - it had 0-14 and 16. Assuming the intent is to set all the pins to analog, I changed "ifi_analog_channels" to "ADC_16ANA" if it helps.

In our file, we had
Code:
#define ADC_14ANA  0b11110001 // analog: AN0->13  digital: AN14->15
#define ADC_16ANA  0b11110000 // All analog
Weird, eh?

Thanks again,
James
Looks like their library documentation is messed-up. Use ADC_16ANA.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org