View Single Post
  #7   Spotlight this post!  
Unread 12-01-2004, 00:27
Jay Lundy Jay Lundy is offline
Programmer/Driver 2001-2004
FRC #0254 (The Cheesy Poofs)
Team Role: Alumni
 
Join Date: Jun 2001
Rookie Year: 2001
Location: Berkeley, CA
Posts: 320
Jay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to all
Re: FRC 16 channels of ADC - must we use them all?

Quote:
Originally Posted by KevinB
To answer the original question, the 16 "analog inputs" cannot be used for digital input or output. However, I did read something about being able to use PWM 13-16 as a digital output -- might wanna look into that.
Hm.. are you sure about that? The only reasons I could think of for us not to be able to use the analog pins for dig I/O are:
1. They are being used by FIRST internal software specifically as analog
2. They are controlled by the master processor.

1 is obviously not true because we can use all 16 pins for our own analog circuits. 2 is not true because all the code for accessing the pins goes directly to the ADC, not some buffer for holding data transmitted from the master.

I know in the code there is a comment on the line that sets the number of analog pins to 16 telling you not to change it, but they have said that before in places where if you know enough about what you are doing you can safely modify.

I'll test this tomorrow when I go up to the lab again.

I'm pretty sure your statement about the PWMs is correct. 1-12 is generated by the master and therefore cannot be changed, but 13-16 is generated by the user, so those are basically general purpose pins which are PWMs by default.