NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Project Help and Ideas » Playstation 2 controller

September 07, 2010
by sporkalicious
sporkalicious's Avatar

Has anyone successfully written code to read the Playstation 2 with the nerdkit? I've found many avr libraries and code examples scattered across the web, mostly for the axon, and the arduino, as well as one that is part of the webbot libs though it seems the nerdkits bootloader may create problems with these.

September 07, 2010
by hevans
(NerdKits Staff)

hevans's Avatar

Hi sporkalicious,

The PS2 controller sends its data much the way a ps2 keyboard does (coincidence im sure). Basically there is a clock line and a data line. Data is sent in packets, you read the state of the data line when ever the clock line transitions from low too high. There is an awesome write-up about here. I don't think it would be too hard to write your interface (it would however be very educational).

If you do want to try to port someones library, the bootloader we use should in no way interfere with any of the programs you find that are written in C for the AVR MCUs. The bootloader is only used to get the code onto the chip. The code found in this write-up should actually work as-is. You will just have to fiddle around with the way they display the data, and getting the pins right. Note the controller operates at 3.3V, so your circuit will have to take that into consideration.

Humberto

Post a Reply

Please log in to post a reply.

Did you know that our USB NerdKit works on Windows, Linux, and Mac OS X? Learn more...