Page 1 of 1

ps2 controller interpreter

Posted: Sun Dec 17, 2006 9:50 pm
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]

Posted: Mon Dec 18, 2006 6:38 am
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?

Posted: Tue Dec 19, 2006 11:00 pm
by ungas45
Yes, that's pretty much how it is.. i'm finding it hard to communicate the mcu with the ps2 controller...

Posted: Wed Dec 20, 2006 8:12 am
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?

Posted: Fri Dec 22, 2006 9:23 pm
by ungas45
i'm not quite familiar with spi but i'll do some research about it.. thnx... :razz:

Posted: Fri Dec 22, 2006 9:30 pm
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..