PlayStation 2 DualShock 2 Controller Ryan O’Keefe, Kabir Singh and Adrian Padin 1.

Slides:



Advertisements
Similar presentations
IO Interfaces and Bus Standards. Interface circuits Consists of the cktry required to connect an i/o device to a computer. On one side we have data bus.
Advertisements

INPUT-OUTPUT ORGANIZATION
Input/Output Organization Asynchronous Bus
82C55 82C55 Programmable Peripheral Interface Interfacing Part III.
Bits and Bytes + Controlling 8 LED with 3 Pins Binary Counting and Shift Registers.
SHIFT REGISTERS: CONVERTING BETWEEN SERIAL AND PARALLEL DATA Mark Neil - Microprocessor Course 1 Serial versus Parallel Data Transfers.
Serial Interfaces, Part Deux -I 2 C and SPI December 4, 2002 Presented by Eugene Ho.
SPI Serial Peripheral Interface. SPI Serial Peripheral Interface is communication between two devices, one bit at a time sequential one bit at time over.
Lecture 8: Serial Interfaces
Shift Register Application Chapter 22 Subject: Digital System Year: 2009.
Playstation 2 Controller David Domanico Justin Kaput 1.
ME106 Sensor Presentation: WII Nunchuck Evan Ly, Marcus Solis 31OCT2012.
Peripherals and their Control An overview of industrially available “peripheral devices” Some ideas for Laboratories and Quiz / Exam questions.
Serial Communication Buses: I 2 C and SPI By Brody Dunn.
CS150 Project Checkpoint 1. Controller Interface Dreamkatz Controller Interface 1. The N64 Controller 2. Physical interface 3. Communication protocol.
CS150 Project Checkpoint 2 CheckPt2 is easy!!! BUT………………. This lab can be very tricky. BUT……………… Mark is here to help! You get to listen to cool.
Guitar Effects Processor Critical Design Review October, 07, 2003 Groups Members: Adam Bernstein Hosam Ghaith Jasenko Alagic Matthew Iyer Yousef Alyousef.
Serial Peripheral Interface (SPI)
SPISPI Term Dr Abdelhafid Bouhraoua Term Dr Abdelhafid Bouhraoua.
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
Digital to Analog Converters
Playstation 2 Controller KYLE YAN AKSHAY MOORTHY YIPING KANG 1.
PS2 Keyboard Interface Using Spartan-3 Starter Kit Board
INPUT-OUTPUT ORGANIZATION
Interfaces A practical approach. Lesson 2 I2C and SPI
SPI By Alexander Maroudis. Outline What is SPI? SPI Configuration SPI Operation Master Slave Setup SPI Transactions SPI Digital Potentiometer Example.
1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Lecture 10: Serial buses Oct 6, 2011.
MODES OF Details of Pins Pin 1 –Connected Ground Pins 2-16 –acts as both input/output. Outputs address at the first part of the cycle and outputs.
Computer Architecture Lecture 08 Fasih ur Rehman.
Serial Peripheral Interface (SPI) Bus. SPI Bus There is no official specification for the SPI bus. It is necessary to consult the data sheets of the devices.
Serial Peripheral Interface Module MTT M SERIAL PERIPHERAL INTERFACE (SPI)
331: STUDY DATA COMMUNICATIONS AND NETWORKS.  1. Discuss computer networks (5 hrs)  2. Discuss data communications (15 hrs)
Advanced Computers and Communications (ACC) Faculty Advisors: Dr. Charles Liu Dr. Helen Boussalis 10/25/20121NASA Grant URC NCC NNX08BA44A Student Assistants:
Khaled A. Al-Utaibi  Intel Peripheral Controller Chips  Basic Description of the 8255  Pin Configuration of the 8255  Block Diagram.
LSU 10/22/2004Serial I/O1 Programming Unit, Lecture 5.
4.0 rtos implementation part II
1 Registers and Counters A register consists of a group of flip-flops and gates that affect their transition. An n-bit register consists of n-bit flip-flops.
I NTRODUCTION P IN CONFIGARATION O PERATING MODE.
Universal Synchronous/Asynchronous Receiver/Transmitter (USART)
Lecture 20: Communications Lecturers: Professor John Devlin Mr Robert Ross.
Universal Asynchronous Receiver/Transmitter (UART)
Autonomous Helicopter James LydenEE 496Harris Okazaki.
64 CONTROLLER 64 CONTROLLER AARON RIDENOUR, RYAN WOOSTER, ALEX JAECKEL.
MODES OF Details of Pins Pin 1GND –Connected Ground Pins 2-16 AD14-AD0–acts as both input/output. Outputs address at the first part of the cycle.
ECE Department: University of Massachusetts, Amherst ECE 354 Lab 4: Remote Control of a Digital Camera.
1 Programming of FPGA in LiCAS ADC for Continuous Data Readout Week 5 Report Tuesday 29 th July 2008 Jack Hickish.
12/16/  List the elements of 8255A Programmable Peripheral Interface (PPI)  Explain its various operating modes  Develop a simple program to.
OCRP RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
OCRP RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
Essentials of Communication This simple model requires many guarantees. Sender Receiver Communication Link Data.
EE365 - Microprocessors period 26 10/23/00 D. R. Schertz # Parallel Ports.
Department of Electronic & Electrical Engineering Serial interfaces Serial Interfaces allow communication between devices sending one bit at a time. In.
Serial Peripheral Interface SPI I2C (i-squared cee)
SHIFT REGISTERS: CONVERTING BETWEEN SERIAL AND PARALLEL DATA Mark Neil - Microprocessor Course 1 Serial versus Parallel Data Transfers.
Communicating. The ATmega16 communicates through one of the following ways: Serial Peripheral Interface (SPI) Universal Synchronous and Asynchronous serial.
Embedded Communication Protocols Don Heer 10/18/10 1.
Networked Embedded Systems Sachin Katti & Pengyu Zhang EE107 Spring 2016 Lecture 9 Serial Buses – SPI, I2C.
BIRLA VISHVAKARMA MAHAVIDYALAY SUBJECT: SPI PROTOCOL & MAX7221 DISPLAY INTERFACING SUBMITTED BY: KISHAN AVASTHI( ) MANSI CHANDEGARA( )
میکرو کنترلرهای AVR Serial Interfaces, I2C and SPI
1. PIC ADC  PIC18F877 has 8 analog input channels i.e. port A pins(RA0 to RA5) and port E pins(RE1 and RE2). These pins are used as Analog input pins.
MICROCONTROLLER AND INTERFACING Presented by: Shefali Jethva ( ) Shivali Panchal ( ) Komal Soni ( ) Roll no. :- 14EC308.
1 Serial Peripheral Interface What is it? Basic SPI Capabilities Protocol Pros and Cons Uses Serial Peripheral Interface
Chapter 11: Inter-Integrated Circuit (I2C) Interface
Chapter D – Serial Connections to the RPi and Analog-to-Digital Converters
Communication Lines Fundamentals.
BJ Furman ME 106 Fundamentals of Mechatronics 15NOV2012
Pulse Width Modulation (PWM)
Serial EEPROM (Atmel 24C-512)
I/O Experiments Assignment 1.
Presentation transcript:

PlayStation 2 DualShock 2 Controller Ryan O’Keefe, Kabir Singh and Adrian Padin 1

PlayStation 2 Controller - Overview I. Previous Methods NES Controller, N64 II. DualShock 2: Input Types Twelve analog buttons Five digital buttons Analog directional sticks III. DualShock 2: Communication Interface SPI Communication Transfer up to 21 bytes of data 2 SX-Original-Controller.jpg

Previous Methods - NES Controller Remember Lab 7 from EECS 270? Four Digital Buttons and the Directional Joypad Only 1 bit precision for each button Communicates with console using shift registers Console initiates by sending a pulse on the latch wire Controller sends 8 pulses and the status of each button 3 ommons/8/83/NES-controller.jpg

Previous Methods - N64 Controller Fourteen Digital Buttons and the “Analog” Joystick N64 was first controller to have a motor for vibration feedback Had “Analog” joystick which was essentially a digital counter What makes PS2 different? 4 nal/0/7465/ n64_controller.jpg

PlayStation 2 - DualShock 2 Features Increase number of buttons and other options: Twelve analog buttons 8 bits of precision for each button Five digital buttons Full analog directional sticks 2 Bytes of precision, 8 bits for X position and 8 bits for each Y position Variable Force-feedback Weighted motors cause controller to vibrate 5

DualShock 2 - Force Feedback DualShock - Two vibration motors One of the first controllers with this feature Left motor provides stronger feedback than right Variable feedback for better game immersion 6 _ps2b240.jpg

DualShock 2 - Analog Sticks Two perpendicular potentiometers per stick Two byte precision One byte each for X and Y axis Completely analog signal Variable resistance changes voltage levels 7 -PX~/s-l500.jpg

All buttons except ‘Start’, ‘Select’, ‘L3’, ‘R3’, and ‘Analog’ are analog Each button has 8 bit encoding Harder press => higher value (0-255) Achieved through variable parallel resistance 8 DualShock 2 - Analog Buttons Resistor

Basic premise is SPI (Serial Peripheral Interface):  One master (PS2 console) and many slaves (controllers)  All devices use the same bus (open collector scheme)  Master and slave communicate at the same time using shift registers  As the master sends data, it receives incoming data from the slave Communicating with the PlayStation 2 9

Controller Interface - SPI Overview Four wires to remember: 1. MOSI (Master Out Slave In) - data from the console to the controller 2. MISO (Master In Slave Out) - data from the controller to the console 3. Clock - both units must be timed to the same clock 4. Select - pick which device to read from 10 Master (PS2 Console) Slave (Controller) Clock Select (Attention) MOSI MISO Shift Register

DualShock 2 - Communication Hardware  Brown (controller->console) - Data sent to console (buttons, analog sticks)  Orange (console->controller) - Data sent to controller (vibration)  Yellow (attention) - slave select  Blue (clock) - generated by master  Green (acknowledge) - controller must respond within 100 µs  Red (power) V  Grey (motor power) - usually 7.4 V  Black (ground) 11

DualShock 2 - Sample Transaction 12

DualShock 2 - Sample Transaction 1. Console pulls clock down to initiate transaction 13

DualShock 2 - Sample Transaction 1. Console pulls clock down to initiate transaction 2. Controller changes data line to reflect status 14

DualShock 2 - Sample Transaction 1. Console pulls clock down to initiate transaction 2. Controller changes data line to reflect status 3. On each rising edge the data is shifted from controller into console 15

DualShock 2 - Sample Transaction 1. Console pulls clock down to initiate transaction 2. Controller changes data line to reflect status 3. On each rising edge the data is shifted from controller into console 4. After eight rising edges, clock remains high to signal end of transaction. A single byte has now been transferred 16

DualShock 2 - Transfer Protocol Start with 3-byte Header 1st Byte: Initiate the transaction *This is the same every time. 17 Byte NumberMasterControllerInformation Type 10x010xFFInitiate 20x420x79Controller Mode 30x000x5AHandshake 2nd Byte: The console specifies which mode it wants: 0x41 = digital mode (no analog stick or analog button data) 0x42 = analog mode (full 21 bytes of data) 3rd Byte: Handshake to indicate that the controller is ready to transmit data

4th byte: 0xNN is state of buttons select, L3, R3, start, up, right, down, and left. 0xLL is vibration data for left motor 5th byte: 0xNN is state of buttons L2, R2, L1, R1, triangle, circle, X, square 0xRR is vibration data for right motor DualShock 2 - Transfer Protocol Bytes 4 and 5 are the digital states of every button (similar to NES controller): 0 - the button is pressed 1 - the button is not pressed 18 Byte NumberMasterControllerInformation Type 10x010xFFInitiate 20x420x79Controller Mode 30x000x5AHandshake 40xLL0xNNDigital Buttons 50xRR0xNNDigital Buttons

DualShock 2 If Analog Mode is specified (0x42), the controller sends another 16 bytes of data  X and Y position of the left and right analog sticks  Analog position of every button except start and select  Each button has 8 bits of precision (256 possible states) 19 ByteMasterControllerInformation Type 10x010xFFHeader (initiate transaction) 20x420x79Header (transaction mode) 30x000x5AHeader (sort of handshake) 40xLL0xNNDigital (select, L3, R3, start, up, right, down, left) 50xRR0xNNDigital (L2, R2, L1, R1, triangle, circle, X, square) 60x000xNNRight Analog Stick X 70x000xNNRight Analog Stick Y 80x000xNNLeft Analog Stick X 90x000xNNLeft Analog Stick Y 100x000xNNRight Button Analog 110x000xNNLeft Button Analog 120x000xNNUp Button Analog 130x000xNNDown Button Analog 140x000xNNTriangle Button Analog 150x000xNNCircle Button Analog 160x000xNNX Button Analog 170x000xNNSquare Button Analog 180x000xNNL1 Button Analog 190x000xNNR1 Button Analog 200x000xNNL2 Button Analog 210x000xNNR2 Button Analog

20 Demonstration Interfacing a PS2 Controller with an Arduino

PlayStation 2 Controller - Summary I. Improvements from Previous Methods Adds versatility to control system Reduces lag because it is not being constantly polled II. Analog Sticks and Buttons 12 buttons each with 8 bits of precision 2 analog sticks with 16 bits of precision 5 digital buttons III. Communication and Transfer Protocol Modified form of SPI Sends 8 bits at once on open-collector bus Digital mode is 5 bytes, Analog mode is 21 bytes 21

Bibliography NES Controller Background: N64 Controller Background: Transfer Protocol: Interfacing to a PS2 Controller (this site was the most helpful): Using a PS2 controller with an Arduino: 22