Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
Thread Tools Display Modes
Old 9th February 2008, 09:35 PM   (permalink)
Experienced Member
ChemE is on a distinguished road
Default Read Playstation Controller Code

I searched for the forums about this and saw that there has been a few topics discussing how to read a playstation controller but those threads did not have all the information I was looking for... so:

I am looking to be able to read a playstation controller using a PIC (an 877A to be exact).

Before I set forth to write code to emulate a playstation host on an 877A I thought I would ask if anyone has this code already written and would be kind enough to share?

I started looking into writing my own code but I am a little worried about timing issues... maybe someone can shed some light on this?
What I am wondering is if I use a 20mhz crystal on an 877A will it be too fast to use SPI to interface with PSX controller... what I mean is will the SPI clock speed be to fast for the controller to keep up? what do you all think?

Thank you for the help!
ChemE is offline   Reply With Quote
Old 9th February 2008, 10:07 PM   (permalink)
Experienced Member
 
Blog Entries: 4
blueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to behold
Send a message via Skype™ to blueroomelectronics
Default

Hard to say but this may help
http://www.gamesx.com/controldata/psxcont/psxcont.htm
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now   Reply With Quote
Old 9th February 2008, 10:19 PM   (permalink)
Experienced Member
 
dknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to behold
Default

You can run the SPI clock slower than the system clock- you know that right? You set the the SPI clock with registers in the IC.

And perhaps this will be of help:
http://www.lynxmotion.com/Product.as...&CategoryID=46
http://sophiateam.undrgnd.free.fr/psx/index.html

And one of the links above leads to this code:
http://www.lynxmotion.com/images/files/ps2cmd01.txt
dknguyen is online now   Reply With Quote
Old 10th February 2008, 06:14 AM   (permalink)
Experienced Member
ChemE is on a distinguished road
Default

Thank you for the replies. The psx document is very help I have been using it. I also looked more into the SPI clock speed and believe I should be alright.

I have another question now. I am trying to interface to different types of microcontrollers through SPI but one thing I have found is that they are at different voltages (3.3v compared to 5v).

If I am trying to receive or send information am i going to have problems since there high signal is not the same? What I am trying to ask is when the 3.3v chip is sending data to the SDI pin of the 5v chip will the 5v chip not register a 3.3v as a high signal?

If I have a problem how do I fix it?

Thank you.
ChemE is offline   Reply With Quote
Old 10th February 2008, 06:18 AM   (permalink)
Experienced Member
 
dknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to behold
Default

Quote:
Originally Posted by ChemE
Thank you for the replies. The psx document is very help I have been using it. I also looked more into the SPI clock speed and believe I should be alright.

I have another question now. I am trying to interface to different types of microcontrollers through SPI but one thing I have found is that they are at different voltages (3.3v compared to 5v).

If I am trying to receive or send information am i going to have problems since there high signal is not the same? What I am trying to ask is when the 3.3v chip is sending data to the SDI pin of the 5v chip will the 5v chip not register a 3.3v as a high signal?

If I have a problem how do I fix it?

Thank you.
More likely than not there will be reliability problems if not outright problems. Use level translator. If you need bidirectional communications over a single line, use a bidirectional one and it is highly preferably one that does automatic direction control rather than a separate direction control pin.
dknguyen is online now   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
PIC18F2620 not being able to self-execute control code ssylee Micro Controllers 20 19th October 2007 04:58 AM
MP Lab Program Help bamafan54 Micro Controllers 3 19th October 2007 02:53 AM
lcd busy code tama182 Micro Controllers 2 17th March 2006 10:00 PM
PIC16F84A Code Protect gatas Micro Controllers 3 21st July 2003 02:44 PM
Monitoring PIns of controller at the same time waqar Micro Controllers 9 12th May 2003 10:12 AM



All times are GMT. The time now is 05:25 PM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.