Go to Post I wouldn't want to force another me on everyone! - Andy Grady [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 05-04-2007, 12:02
bear24rw's Avatar
bear24rw bear24rw is offline
Team 11 Programming Captain
AKA: Max T
FRC #0011 (MORT)
Team Role: Programmer
 
Join Date: Sep 2005
Rookie Year: 2005
Location: Flanders, NJ
Posts: 385
bear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to behold
Send a message via AIM to bear24rw
Reading NES controller from digital inputs

I wrote some code to read the buttons of the NES controller and thought I would post it here if anyone was interested..

http://s25.photobucket.com/albums/c9...t=CIMG2062.jpg
http://youtube.com/watch?v=DVwo3C_YW0U

More information can be found here..
http://pinouts.ru/Game/snescontroller_pinout.shtml
http://www.diylive.net/index.php/200...es-controller/
Attached Files
File Type: c nes.c (1.2 KB, 43 views)
File Type: h nes.h (289 Bytes, 30 views)
  #2   Spotlight this post!  
Unread 05-04-2007, 21:59
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: Reading NES controller from digital inputs

Cool! Now all you need to do is upgrade it to use a controller that has analog inputs.
__________________
Eric Haskins KC9JVH
  #3   Spotlight this post!  
Unread 06-04-2007, 02:17
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: Reading NES controller from digital inputs

Next Step: Atari
  #4   Spotlight this post!  
Unread 06-04-2007, 07:25
Qbranch Qbranch is offline
wow college goes fast.
AKA: Alex
FRC #1024 (Kil-A-Bytes)
Team Role: Alumni
 
Join Date: Apr 2006
Rookie Year: 2006
Location: Indianapolis
Posts: 1,174
Qbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond repute
Re: Reading NES controller from digital inputs

It sucks that you cant reprogram the OI's processor.... this would prove impossible to do to on the OI the way its programmed with the 26.2ms update.

-q
__________________
Electrical Engineer Illini
1024 | Programmer '06, '07, '08 | Driver '08
  #5   Spotlight this post!  
Unread 06-04-2007, 09:43
karlcswanson's Avatar
karlcswanson karlcswanson is offline
Registered User
FRC #0111 (WildStang)
Team Role: Alumni
 
Join Date: Nov 2005
Rookie Year: 2005
Location: Arlington Hts.
Posts: 63
karlcswanson is just really nicekarlcswanson is just really nicekarlcswanson is just really nicekarlcswanson is just really nicekarlcswanson is just really nice
Re: Reading NES controller from digital inputs

Quote:
Originally Posted by Qbranch View Post
It sucks that you cant reprogram the OI's processor.... this would prove impossible to do to on the OI the way its programmed with the 26.2ms update.

-q
You could make a custom circuit to translate what is coming from the nes controller to the digital inputs on the OI.
__________________
  #6   Spotlight this post!  
Unread 06-04-2007, 10:17
bear24rw's Avatar
bear24rw bear24rw is offline
Team 11 Programming Captain
AKA: Max T
FRC #0011 (MORT)
Team Role: Programmer
 
Join Date: Sep 2005
Rookie Year: 2005
Location: Flanders, NJ
Posts: 385
bear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to behold
Send a message via AIM to bear24rw
Re: Reading NES controller from digital inputs

Quote:
Originally Posted by karlcswanson View Post
You could make a custom circuit to translate what is coming from the nes controller to the digital inputs on the OI.
Yeah all you would need is a simple microchip like a PIC16F or something
  #7   Spotlight this post!  
Unread 06-04-2007, 15:00
John Gutmann John Gutmann is offline
I'm right here
AKA: sparksandtabs
FRC #0340 (GRR)
Team Role: Mechanical
 
Join Date: Feb 2005
Rookie Year: 2004
Location: rochester
Posts: 804
John Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant future
Send a message via AIM to John Gutmann Send a message via MSN to John Gutmann Send a message via Yahoo to John Gutmann
Re: Reading NES controller from digital inputs

Quote:
Originally Posted by Qbranch View Post
It sucks that you cant reprogram the OI's processor.... this would prove impossible to do to on the OI the way its programmed with the 26.2ms update.

-q
I am friends with someone who has programmed over the loop in the RC, it just sends a signal to the coprocessor ever 26.2 ms so that it thinks it is doing the right thing.
  #8   Spotlight this post!  
Unread 06-04-2007, 19:00
bear24rw's Avatar
bear24rw bear24rw is offline
Team 11 Programming Captain
AKA: Max T
FRC #0011 (MORT)
Team Role: Programmer
 
Join Date: Sep 2005
Rookie Year: 2005
Location: Flanders, NJ
Posts: 385
bear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to behold
Send a message via AIM to bear24rw
Re: Reading NES controller from digital inputs

Quote:
Originally Posted by sparksandtabs View Post
I am friends with someone who has programmed over the loop in the RC, it just sends a signal to the coprocessor ever 26.2 ms so that it thinks it is doing the right thing.
Can he control all the pwm's from the user processor?
  #9   Spotlight this post!  
Unread 06-04-2007, 22:28
Qbranch Qbranch is offline
wow college goes fast.
AKA: Alex
FRC #1024 (Kil-A-Bytes)
Team Role: Alumni
 
Join Date: Apr 2006
Rookie Year: 2006
Location: Indianapolis
Posts: 1,174
Qbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond repute
Re: Reading NES controller from digital inputs

It might keep the SPI happy... but does it would have to communicate full packets to the master micro so that the checksums and byte counts check.... what did he gain out of writing his own loop?

Also, is it legal to have custom circuits on the OI? I never went to the FIRST school of law. If it is legal....

I wish they had a higher current capability on the +5v supply though, don't suppose you could run much of anything anyhow, but a Nanowatt series microchip micro should be ok.

-q
__________________
Electrical Engineer Illini
1024 | Programmer '06, '07, '08 | Driver '08
  #10   Spotlight this post!  
Unread 06-04-2007, 23:35
karlcswanson's Avatar
karlcswanson karlcswanson is offline
Registered User
FRC #0111 (WildStang)
Team Role: Alumni
 
Join Date: Nov 2005
Rookie Year: 2005
Location: Arlington Hts.
Posts: 63
karlcswanson is just really nicekarlcswanson is just really nicekarlcswanson is just really nicekarlcswanson is just really nicekarlcswanson is just really nice
Re: Reading NES controller from digital inputs

Quote:
Originally Posted by Qbranch View Post
It might keep the SPI happy... but does it would have to communicate full packets to the master micro so that the checksums and byte counts check.... what did he gain out of writing his own loop?

Also, is it legal to have custom circuits on the OI? I never went to the FIRST school of law. If it is legal....

I wish they had a higher current capability on the +5v supply though, don't suppose you could run much of anything anyhow, but a Nanowatt series microchip micro should be ok.

-q
It is legal as long as they are powered only from the 5 volts from the joystick ports, the current limit is 10 ma though.
__________________
  #11   Spotlight this post!  
Unread 07-04-2007, 01:17
John Gutmann John Gutmann is offline
I'm right here
AKA: sparksandtabs
FRC #0340 (GRR)
Team Role: Mechanical
 
Join Date: Feb 2005
Rookie Year: 2004
Location: rochester
Posts: 804
John Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant future
Send a message via AIM to John Gutmann Send a message via MSN to John Gutmann Send a message via Yahoo to John Gutmann
Re: Reading NES controller from digital inputs

Quote:
Originally Posted by bear24rw View Post
Can he control all the pwm's from the user processor?
From what I know they had all functionality, I will talk to him and try to get more info on it.
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
Digital inputs in autonomous mode? Calvin Programming 8 18-02-2006 13:16
Digital Inputs interfering with each other Bongle Programming 8 23-02-2004 11:18
How to access other Digital inputs on OI? DougHogg Electrical 2 12-03-2003 13:57
Digital inputs, bandwith, errors? Micah Brodsky Programming 7 20-01-2003 16:08
Analog vs Digital inputs? f22flyboy Programming 8 08-11-2002 22:18


All times are GMT -5. The time now is 03:14.

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