Go to Post Y'know... I think I'd much rather have big balls than hang myself... - FotoPlasma [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 11-01-2004, 18:10
Larry Barello Larry Barello is offline
http://www.barello.net
#0492 (Titan Robotics Club)
Team Role: Mentor
 
Join Date: Jan 2002
Location: Bellevue, WA
Posts: 85
Larry Barello has a spectacular aura aboutLarry Barello has a spectacular aura about
FRC 16 channels of ADC - must we use them all?

THe FRC default code fixes the 16 ADC inputs as Analog inputs. Is there any reason for this? Could I just allocate a couple, like in the EDU controller, for analog and reserve the rest for something more interesting like an LCD display & key pad?
  #2   Spotlight this post!  
Unread 11-01-2004, 19:20
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 Larry Barello
THe FRC default code fixes the 16 ADC inputs as Analog inputs. Is there any reason for this? Could I just allocate a couple, like in the EDU controller, for analog and reserve the rest for something more interesting like an LCD display & key pad?
I'm sure you could but you already have 18 digital I/O pins. If you use 8 of those for a parallel LCD you still have 10 for other stuff.
  #3   Spotlight this post!  
Unread 11-01-2004, 19:50
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: FRC 16 channels of ADC - must we use them all?

Quote:
Originally Posted by Jay Lundy
If you use 8 of those for a parallel LCD you still have 10 for other stuff.
it takes 6 lines in 4-bit mode to implement an HD44780 compatible LCD(4 data + E + RW), and 10 to implement one in 8-bit mode.
__________________
1139 Alumni
  #4   Spotlight this post!  
Unread 11-01-2004, 22:36
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 Rickertsen2
it takes 6 lines in 4-bit mode to implement an HD44780 compatible LCD(4 data + E + RW), and 10 to implement one in 8-bit mode.
Oh yeah.

Actually you need one more for the RS pin, so 7 pins/11 pins. I can see how you might be running out of dig I/O pins if you use 11 of them. If the busy flag isn't important to you you can ground the R/W and use 6 pins/10 pins.

Or you can set up a cheap external circuit to take serial data from the RC and make it parallel. Or you can get a serial LCD.
  #5   Spotlight this post!  
Unread 11-01-2004, 22:52
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: FRC 16 channels of ADC - must we use them all?

Quote:
Originally Posted by Jay Lundy
Actually you need one more for the RS pin, so 7 pins/11 pins. I can see how you might be running out of dig I/O pins if you use 11 of them. If the busy flag isn't important to you you can ground the R/W and use 6 pins/10 pins.
O yea, I forgot about the RS.
Quote:
Originally Posted by Jay Lundy
Or you can set up a cheap external circuit to take serial data from the RC and make it parallel. Or you can get a serial LCD.
I think i have even seen premade "backpacks".
__________________
1139 Alumni
  #6   Spotlight this post!  
Unread 11-01-2004, 23:41
KevinB's Avatar
KevinB KevinB is offline
Registered User
AKA: Alum
no team
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2001
Location: AL
Posts: 188
KevinB will become famous soon enoughKevinB will become famous soon enough
Send a message via ICQ to KevinB
Re: FRC 16 channels of ADC - must we use them all?

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.
  #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.
  #8   Spotlight this post!  
Unread 12-01-2004, 21:44
KevinB's Avatar
KevinB KevinB is offline
Registered User
AKA: Alum
no team
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2001
Location: AL
Posts: 188
KevinB will become famous soon enoughKevinB will become famous soon enough
Send a message via ICQ to KevinB
Re: FRC 16 channels of ADC - must we use them all?

Quote:
Originally Posted by Jay Lundy
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.
For some reason I thought that the pins connected to the ADC couldn't be accessed without using the ADC. Now that I've read your post .... you're probably right. I will definately do some poking around and see what happens.
Closed Thread


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
ADC problems with C library and new code Larry Barello Programming 1 09-01-2004 22:31
2003's FRC Robot Controller ahmed Programming 7 18-12-2003 22:43
For FRC want-to-be Teams Rich Wong Starting New Teams 1 18-07-2003 13:30
Programming Gyros goegan31 Programming 33 19-05-2003 20:05
Request for FLL Volunteers for FLL National Invitational at the FRC Championships Natchez General Forum 3 08-04-2003 12:19


All times are GMT -5. The time now is 19:52.

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