Go to Post A clean pit is a happy pit, a clean pit is a controlled pit, a clean pit is a safe pit. - DjAlamose [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-02-2009, 15:24
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: Using a GPIO pin for both input and output.

Take a look at the I2C interface schematic for another implementation.

Quote:
Originally Posted by Shinigami2057 View Post

To the WPILib/FPGA guys:
I'd be nice to have the option bypass the FPGA completely and allow users to implement their own GPIO logic, for those willing to take the plunge.
Can you explain what you mean by this? I am unsure as to what feature you want to add. The direction change timing is a function of the module, not of the FPGA image. The provided image doesn't get in the way unless you ask it to.
Reply With Quote
  #2   Spotlight this post!  
Unread 24-02-2009, 12:24
oddjob oddjob is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Earth
Posts: 118
oddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to behold
Re: Using a GPIO pin for both input and output.

We don't have a spare cRIO so I'm not doing any coding now. Often I2C is a special hardware module in the microcontroller and that module takes care of the I2C data line direction. Also, I2C data and clock are open drain connections.

For our robot, it would be great to have a direction controllable pin. Call it whatever, maybe DigitalPin, with a method to control the pin drive mode.

Get() to read the pin.
Set() to set the pin. (the pin needs to be set to drive for the pin to change).
DriveMode() to drive or float the pin.

If there is no FPGA constraint to changing drive mode at run time, the DigitalInput and DigitalOutput classes could be obsoleted by DigitalPin.
Reply With Quote
  #3   Spotlight this post!  
Unread 24-02-2009, 20:04
Shinigami2057 Shinigami2057 is offline
Slackware Is Your New God (Mentor)
AKA: Harry Bock
FRC #1350 (Rambots)
Team Role: Programmer
 
Join Date: Oct 2006
Rookie Year: 2006
Location: Johnston, RI
Posts: 106
Shinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really nice
Re: Using a GPIO pin for both input and output.

Quote:
Originally Posted by EricVanWyk View Post
Take a look at the I2C interface schematic for another implementation.



Can you explain what you mean by this? I am unsure as to what feature you want to add. The direction change timing is a function of the module, not of the FPGA image. The provided image doesn't get in the way unless you ask it to.
Thanks for the clarification; I was under the impression the FPGA was handling the digital I/O as well. If the digital I/O is left untouched, what is the expected delay of changing the direction? Is it enough to warrant using a custom circuit with two pins?

One more quick question: is there any more concrete documentation on what exactly the FPGA does and does not do, and perhaps documentation on how to interface directly with the cRIO functionality? Looking at the WPILib implementation, there's a lot of headers without corresponding source files in the DIO/ChipObject interfaces. If I'd like to work on my own interface/API, would it be possible to get more specific docs or would I have to use WPILib as a reference to how to use the hardware?
__________________
One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.
Reply With Quote
Reply


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
AnalogChannel as both an accumulator AND a normal input? Jared Russell C/C++ 2 31-01-2009 10:14
Dashboard Analog Meters and GPIO? Geek_Girl Programming 1 17-12-2008 09:50
Analog pin output data 3DWolf Programming 3 22-01-2008 10:23
roll pin into output shaft m1k3 Kit & Additional Hardware 18 15-01-2008 16:18
using set screw or dowel pin/pin to hold on drill motor coupler thinggy Travis Covington Motors 1 04-02-2002 03:02


All times are GMT -5. The time now is 13:12.

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