ps2 controller interpreter

Electronics Computer Programming Q&A
Post Reply
ungas45
Posts: 6
Joined: Sun Jun 25, 2006 6:32 pm
Location: philippines
Contact:

ps2 controller interpreter

Post by ungas45 »

:sad: could someone help me.. i'm doing a project on a ps2 interpreter , i'm using a zilog (Z8F1621)mcu and a 18.4 mhz crystal timer. i have found a circuit on the net on making an interpreter but it uses a different mcu and timer as well. I'm wondering if the same circuit would work on my zilog mcu. Plus i also need a program for the interpreter (if possible in C/C++). could someone help me...any help would be greatly appreciated.

the url below is the image of the ckt as well as the project for an interpreter i found on the net(jst copy and paste it on ur adress bar):

http://www.geocities.com/digitan000/Har ... ematic.gif
http://www.geocities.com/digitan000/Har ... _page.html



plsss!!!! :cry: i really need help.

[/url]
Sambuchi
Posts: 366
Joined: Tue Jan 18, 2005 1:01 am
Location: Orlando FL
Contact:

Post by Sambuchi »

Just to clarify...

Would you be interfacing a Playstation controller directly to your Microprocessor board? Where the Microprocessor board is acting as a Playstation sending the read commands?
ungas45
Posts: 6
Joined: Sun Jun 25, 2006 6:32 pm
Location: philippines
Contact:

Post by ungas45 »

Yes, that's pretty much how it is.. i'm finding it hard to communicate the mcu with the ps2 controller...
Sambuchi
Posts: 366
Joined: Tue Jan 18, 2005 1:01 am
Location: Orlando FL
Contact:

Post by Sambuchi »

Hello ungas45.

Are you familiar with a protocol called SPI? I ask this because the following data lines are very similar...

Code: Select all

               |BIT 0|BIT 1|BIT 2|BIT 3|BIT 4|BIT 5|BIT 6|BIT 7|
    CLOCK -----___---___---___---___---___---___---___---___-----------

    DATA  -----000000111111222222333333444444555555666666777777--------
                  *     *     *     *     *     *     *     *
    CMND  -----000000111111222222333333444444555555666666777777--------

    ACK   ----------------------------------------------------------__-

five lines: command (CMND), data (DATA), clock (CLK), attention (ATT), and acknowledge (ACK).

The protocol used is similar enough to SPI that the controller can be directly connected to some SPI pins.

CMND goes to MOSI
DATA goes to MISO
CLK goes to SCK

SPI doesn't support acknowledge so connect the ACK line to an external interrupt pin.

So when you want to communicate with the controller.

Microcontroller initiates communication by pulling the ATT line low.

Have a delay... then send the 0x01 on CMND.

The rest of the transmission is handled by a rising edge of the ACK line.

Does this make sense so far?
ungas45
Posts: 6
Joined: Sun Jun 25, 2006 6:32 pm
Location: philippines
Contact:

Post by ungas45 »

i'm not quite familiar with spi but i'll do some research about it.. thnx... :razz:
ungas45
Posts: 6
Joined: Sun Jun 25, 2006 6:32 pm
Location: philippines
Contact:

Post by ungas45 »

ok i see now..... i guess i'll try it out... if yuo have anymore ideas i would greatly appreciate it tnx a lot..
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests