Go to Post I like ice cream. - Andy Baker [more]
Home
Go Back   Chief Delphi > ChiefDelphi.com Website > Extra Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 07-02-2006, 10:52
kc8nod's Avatar
kc8nod kc8nod is offline
Registered User
AKA: Ted Hansen
FRC #1216 (Knights)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Oak Park Michigan
Posts: 43
kc8nod is on a distinguished road
Re: White Paper Discuss: Playstation 2 Controller Adapter

I can't open the schematic file. I get the error "ps2adapter.sch is not a valid ExpressSCH file". The layout file opens fine with ExpressPCB. Any ideas what's wrong?

p.s. great job guys, thanks for all the hard work.
Reply With Quote
  #17   Spotlight this post!  
Unread 07-02-2006, 12:45
jakep jakep is offline
Software Engineer
AKA: Jake Poznanski
FRC #0862 (Lightning Robotics)
Team Role: Programmer
 
Join Date: Aug 2005
Rookie Year: 2004
Location: Michigan
Posts: 35
jakep has a spectacular aura aboutjakep has a spectacular aura about
Re: White Paper Discuss: Playstation 2 Controller Adapter

The PCB file is for use with Express PCB, the schematics were made using Eagle Layout software.

To modify the adapter to use different axes and such, you will need to modify the code. The source code is included, and it will compile with free compilers like gpasm. In the future, we will be working on a better base code to allow for more changes, buttons, and axes.
__________________
Jake Poznanski
Programmer - Team 862 - Lightning Robotics

Microsoft MVP, 2005 - Windows - SPOT Technologies
http://www.spotdev.net
Reply With Quote
  #18   Spotlight this post!  
Unread 08-02-2006, 16:50
kc8nod's Avatar
kc8nod kc8nod is offline
Registered User
AKA: Ted Hansen
FRC #1216 (Knights)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Oak Park Michigan
Posts: 43
kc8nod is on a distinguished road
Re: White Paper Discuss: Playstation 2 Controller Adapter

FYI, you can buy the PIC and the digipots from DigiKey:

Code:
Part Number        Description                       Price 
PIC16F688-I/P-ND   IC PIC MCU FLASH 4KX14 14DIP      $3.35 
DS1267-100-ND      IC POT DUAL DIGITAL 100K 14-DIP   $3.32
Reply With Quote
  #19   Spotlight this post!  
Unread 10-02-2006, 15:56
Ellery's Avatar Unsung FIRST Hero
Ellery Ellery is offline
Working on my 10 month old robot...
AKA: Ellery
no team (X-CATS - on Sabbatical)
Team Role: Leadership
 
Join Date: Jun 2001
Rookie Year: 1999
Location: Rochester, NY
Posts: 383
Ellery has a reputation beyond reputeEllery has a reputation beyond reputeEllery has a reputation beyond reputeEllery has a reputation beyond reputeEllery has a reputation beyond reputeEllery has a reputation beyond reputeEllery has a reputation beyond reputeEllery has a reputation beyond reputeEllery has a reputation beyond reputeEllery has a reputation beyond reputeEllery has a reputation beyond repute
Send a message via AIM to Ellery Send a message via Yahoo to Ellery
Re: White Paper Discuss: Playstation 2 Controller Adapter

Jake,

I've been trying to compile and program your source code with MPLab but do I need to change your code again to be able to compile and program with the Microchip Picstart Plus programmer?

According to your Remarks you changed the PNUM_DATA 0; Pin_DATA PortA, 0; <-What were the original values?

If you are programming directly from the PS2 plug I assume you're direct wiring the plug to the board pinouts for the 7 inputs to the match the programmer pins.

Let me know what i'm missing here.

Thanks

Ellery
__________________
Xerox Sr. Systems Engineer
Other jobs: Retired X-CATS Team Leader, Inaugural FLR MC and plain ol' nice guy
Team# 191 X-CATS - Est.1992 (www.x-cats.org)
"We don't just build robots we build people..."
Reply With Quote
  #20   Spotlight this post!  
Unread 11-02-2006, 15:32
jakep jakep is offline
Software Engineer
AKA: Jake Poznanski
FRC #0862 (Lightning Robotics)
Team Role: Programmer
 
Join Date: Aug 2005
Rookie Year: 2004
Location: Michigan
Posts: 35
jakep has a spectacular aura aboutjakep has a spectacular aura about
Re: White Paper Discuss: Playstation 2 Controller Adapter

No, you do not have to change any of the sourcecode to use a different programmer.

The comments are unfortunately somewhat misleading, which pins you use for programming are built into the chip itself. The reason for that comment was that we had to move around some of our inputs to make sure the MCLR pin was free to be wired to a custom programmer. This way, we can wire an unused pin on the PS2 plug to MCLR, and when we want to program the chip, we can apply 12volts to that pin and not worry about any of the voltage flowing to the sensitive digipots.
__________________
Jake Poznanski
Programmer - Team 862 - Lightning Robotics

Microsoft MVP, 2005 - Windows - SPOT Technologies
http://www.spotdev.net
Reply With Quote
  #21   Spotlight this post!  
Unread 20-02-2006, 02:28
maniac_2040's Avatar
maniac_2040 maniac_2040 is offline
Registered User
AKA: Matt
FRC #3302 (Turbo Trojans)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Clawson, Michigan
Posts: 34
maniac_2040 is infamous around these partsmaniac_2040 is infamous around these partsmaniac_2040 is infamous around these partsmaniac_2040 is infamous around these parts
Send a message via MSN to maniac_2040
Re: White Paper Discuss: Playstation 2 Controller Adapter

I have a question regarding the code. When you're writing the digital outputs you have this smiget of code:

movlw 0x87 ; Write the first set of digital outputs
btfss datast+2, 2 ; L1
xorlw 0x80
btfss datast+2, 0 ; L2
iorlw 0x40
btfss datast+2, 3 ; R1
iorlw 0x20
btfss datast+2, 1 ; R2
iorlw 0x10
movwf digipots+2

On the first line is there any particular reason you used the hex value of 87 and then xor'd the L1 bit(when pressed) to the final output? Couldn't you just movlw 0x00 and the iorlw 0x80 just as you do all the following? I modified the code like such and wanted to know if it'd work:

;Write the first set of digital outputs
movlw 0x00
btfss PS2_BUTTON_BYTE_1, L1_BUTTON
iorlw 0x80
btfss PS2_BUTTON_BYTE_1, L2_BUTTON
iorlw 0x40
btfss PS2_BUTTON_BYTE_1, R1_BUTTON
iorlw 0x20
btfss PS2_BUTTON_BYTE_1, R2_BUTTON
iorlw 0x10
btfss PS2_BUTTON_BYTE_1, TRIANGLE_BUTTON
iorlw 0x08
btfss PS2_BUTTON_BYTE_1, CIRCLE_BUTTON
iorlw 0x04
btfss PS2_BUTTON_BYTE_1, X_BUTTON
iorlw 0x02
btfss PS2_BUTTON_BYTE_1, SQUARE_BUTTON
iorlw 0x01
movwf digipots+2

Yea I changed all the datast and #'s to some defines....will this code work?
Reply With Quote
  #22   Spotlight this post!  
Unread 20-02-2006, 16:45
jakep jakep is offline
Software Engineer
AKA: Jake Poznanski
FRC #0862 (Lightning Robotics)
Team Role: Programmer
 
Join Date: Aug 2005
Rookie Year: 2004
Location: Michigan
Posts: 35
jakep has a spectacular aura aboutjakep has a spectacular aura about
Re: White Paper Discuss: Playstation 2 Controller Adapter

No, your code will not work. The reason is that the analog signals sent out by the digipots and the OI are not sensitive enough to accurately measure a 1 bit difference on an analog port. The max we had good results with was 4 digital outputs on one 8bit analog signal. The reason it is 0x87 is to provide an offset so that if there is a difference of 1 bit, it won't erroneously send button signals.
__________________
Jake Poznanski
Programmer - Team 862 - Lightning Robotics

Microsoft MVP, 2005 - Windows - SPOT Technologies
http://www.spotdev.net
Reply With Quote
  #23   Spotlight this post!  
Unread 04-05-2006, 19:03
Pavan Dave's Avatar
Pavan Dave Pavan Dave is offline
Busy in College
AKA: I am John Gault.
FRC #1745 (P-51 Mustangs) FRC #118 (Robonauts)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Richardson, Texas
Posts: 1,387
Pavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond repute
Send a message via AIM to Pavan Dave
Re: White Paper Discuss: Playstation 2 Controller Adapter

Good job guys. I finally found this thread. I appreciate you guys taking the time to do this and helping other FIRST teams with cool new innovative ways to control their robot.

Kudos

Pavan
__________________
Times change. People change. Teams change.
---
2008-Present: FRC1745, P51-Mustangs - Mentor
2005-2008: FRC118, Robonauts - Alumni
National Director of Philanthropy - Delta Epsilon Psi Fraternity, Inc.
1745 - 118 - ΔΕΨ
Reply With Quote
  #24   Spotlight this post!  
Unread 08-05-2006, 02:47
Barry Craig's Avatar
Barry Craig Barry Craig is offline
Crazy Mad Filer
FRC #1852 (Team Amore)
Team Role: Electrical
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Scottsdale, Arizona
Posts: 22
Barry Craig is an unknown quantity at this point
Re: White Paper Discuss: Playstation 2 Controller Adapter

Can you post the schematics on the PS2 programmer you made? It seems very interesting and I would like to use that too, if it is alright with you.
__________________
Barry "Barricus" Craig
Electrical Head/Leadership/Hammer & File Man
Team Amore 1852
"Details, details!"-Mentor Mark Johnson, on everything that we thought was important.

2006 AZ Regional - 8th Place, Highest Rookie Seed Award, Judges Award

Amore Robotics
Reply With Quote
  #25   Spotlight this post!  
Unread 08-05-2006, 17:41
Not2B's Avatar
Not2B Not2B is offline
Registered User
AKA: Brian Graham
FRC #0862 (Lightning Robotics)
Team Role: Mentor
 
Join Date: Apr 2002
Rookie Year: 2002
Location: Farmington Hills, Mi
Posts: 401
Not2B has a reputation beyond reputeNot2B has a reputation beyond reputeNot2B has a reputation beyond reputeNot2B has a reputation beyond reputeNot2B has a reputation beyond reputeNot2B has a reputation beyond reputeNot2B has a reputation beyond reputeNot2B has a reputation beyond reputeNot2B has a reputation beyond reputeNot2B has a reputation beyond reputeNot2B has a reputation beyond repute
Re: White Paper Discuss: Playstation 2 Controller Adapter

Quote:
Originally Posted by Barry Craig
Can you post the schematics on the PS2 programmer you made? It seems very interesting and I would like to use that too, if it is alright with you.
I'm asking them for the instruction on how to make your own programmer. But in the mean time, our website maven gave me this...

http://www.sparkfun.com/commerce/pro...?products_id=8

He said he uses it, you don't have to make your own programmer, and you don't need to write your own code.
__________________
Brian Graham
Reply With Quote
  #26   Spotlight this post!  
Unread 09-05-2006, 18:12
d0nk d0nk is offline
BOFH
AKA: ryan
FRC #0862 (Lightning Robotics)
Team Role: Webmaster
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Canton, MI
Posts: 1
d0nk is an unknown quantity at this point
Re: White Paper Discuss: Playstation 2 Controller Adapter

Yeah, i'm the one who told Not2B about that programmer. I bought it last august when i wanted to mess around with PIC's, and found it very easy to use. Use it in conjunction with the ICProg software (free, supports the programmer, which is known as a "JDM" programmer). Sparkfun also has tutorials on getting started with the programmer, and PIC's in general. If the programmer supports the IC, but doesn't have a "slot" for it (the 14/16 pin chips dont fit on the programmer), you can use the built in ICSP header, and jumper to the pic (usually in a breadboard, if programming in this manner).
__________________
Ryan, team 862 Lightning
Team stuff - Website - Programming
Online Stuff - Protium IRC Network - Paluminum (personal site, kind of)

PC: amd64 3200+, GeForce 6600GT, Ubuntu Linux: Dapper Drake beta2
Reply With Quote
  #27   Spotlight this post!  
Unread 16-05-2006, 23:07
Barry Craig's Avatar
Barry Craig Barry Craig is offline
Crazy Mad Filer
FRC #1852 (Team Amore)
Team Role: Electrical
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Scottsdale, Arizona
Posts: 22
Barry Craig is an unknown quantity at this point
Re: White Paper Discuss: Playstation 2 Controller Adapter

Quote:
Originally Posted by d0nk
Yeah, i'm the one who told Not2B about that programmer. I bought it last august when i wanted to mess around with PIC's, and found it very easy to use. Use it in conjunction with the ICProg software (free, supports the programmer, which is known as a "JDM" programmer). Sparkfun also has tutorials on getting started with the programmer, and PIC's in general. If the programmer supports the IC, but doesn't have a "slot" for it (the 14/16 pin chips dont fit on the programmer), you can use the built in ICSP header, and jumper to the pic (usually in a breadboard, if programming in this manner).
I already bought the PICkit Flash 1 from Microchip, which uses MPLAB. Would I be able to upload the supplied hex file with this, or if I cannot, just copy and paste the source code into a new project?
__________________
Barry "Barricus" Craig
Electrical Head/Leadership/Hammer & File Man
Team Amore 1852
"Details, details!"-Mentor Mark Johnson, on everything that we thought was important.

2006 AZ Regional - 8th Place, Highest Rookie Seed Award, Judges Award

Amore Robotics
Reply With Quote
  #28   Spotlight this post!  
Unread 20-11-2006, 14:09
Ryan O's Avatar
Ryan O Ryan O is offline
FRC Eclipse Plug-in Developer
no team (FRC Eclipse)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Plaistow
Posts: 111
Ryan O is an unknown quantity at this point
Send a message via AIM to Ryan O
Re: White Paper Discuss: Playstation 2 Controller Adapter

Hi,

I recently read your white papers, and I have an idea. However, to make it work, I need to shift out all the data coming from the controller in a way to register when buttons are pressed, ect, like you did to get some of them. I think that if this is possible you could wire all the x, y and buttons to one or more ports to utilize the full potential of the controller. Any help would be greatly appreciated.

Thanks,

Ryan O
Team 350 Porgrammer/Electrical
Reply With Quote
  #29   Spotlight this post!  
Unread 20-11-2006, 15:13
6600gt's Avatar
6600gt 6600gt is offline
Registered User
AKA: Lohit
FRC #0226 (Hammerhead)
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Troy, MI
Posts: 221
6600gt is a jewel in the rough6600gt is a jewel in the rough6600gt is a jewel in the rough
Re: White Paper Discuss: Playstation 2 Controller Adapter

Quote:
Originally Posted by Manual
<R78> All equipment connected to the Joystick Ports of the IFI Operator Interface must be powered solely
through the power available through the port. External power sources of any type are not permitted on any
equipment connected to the Joystick Ports. Portable computing devices may not be connected to Joystick
input ports on the Operator Interface. Power-passive devices (e.g. joysticks that draw their power solely
through the IFI Operator Interface joystick port) are permitted.
Is a PIC really considered as a portable computing device?
Because I want to use one for modifying non real time values form the OI.

Last edited by 6600gt : 20-11-2006 at 15:16.
Reply With Quote
  #30   Spotlight this post!  
Unread 20-11-2006, 21:18
jakep jakep is offline
Software Engineer
AKA: Jake Poznanski
FRC #0862 (Lightning Robotics)
Team Role: Programmer
 
Join Date: Aug 2005
Rookie Year: 2004
Location: Michigan
Posts: 35
jakep has a spectacular aura aboutjakep has a spectacular aura about
Re: White Paper Discuss: Playstation 2 Controller Adapter

The design we made was used legally in two regionals and nationals last year, so it doesn't really count as a computer device.

Also, to all teams wanting to make one of these for this years competition, we, the creators of the design, must advise you about an issue we had with it. We had some power regulation issues, which cause the thing to occasionally drop connection during competitions (works fine when the OI is powered from an AC adapter, but not always in competitions when all OIs are off of one power supply). We have some ideas about updating the design to fix this problem, like adding a capacitor to help prevent short lived power drops. We don't have a solution yet, but we will probably be updating the white paper when we do. Please proceed at your own risk when building these, at least until we get a fix available. (It should be a simple solution, not requiring new boards to be made if you already did)
__________________
Jake Poznanski
Programmer - Team 862 - Lightning Robotics

Microsoft MVP, 2005 - Windows - SPOT Technologies
http://www.spotdev.net

Last edited by jakep : 20-11-2006 at 21:25.
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
White Paper Discuss: NEMO White Paper: 25 Ways Sponsors Can Help Your Team Jessica Boucher Extra Discussion 1 20-11-2005 20:01
White Paper Discuss: 2005 IRI - Everything You Need to Know (or at least most of it) Chris Fultz Off-Season Events 3 17-05-2005 20:14
White Paper Discuss: Joystick Sensitivity Demystified - Version 2 marccenter Extra Discussion 0 28-02-2005 16:54
White Paper Discuss: Comparison Paper for Teacher Involvement CD47-Bot Extra Discussion 1 13-11-2004 00:09
White Paper Discuss: Controller Circuit- Infrared Emitters CD47-Bot Extra Discussion 1 13-02-2004 17:48


All times are GMT -5. The time now is 22:05.

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