90 likes | 361 Views
PS2 Game Pad Control. 1. Connection:. Brown: data (data from PlayStation 2) Orange: Command. //Grey : motor Power 7.2V-9V. Black: ground. Red: Power 3.3V Yellow: attention. Blue: clock. //While: none. //Green : ack. 2. Programming:. Brown: data (data from PlayStation 2) 1 st i/o Input
E N D
PS2 Game Pad Control 1. Connection: • Brown: data (data from PlayStation 2) • Orange: Command. • //Grey : motor Power 7.2V-9V. • Black: ground. • Red: Power 3.3V • Yellow: attention. • Blue: clock. • //While: none. • //Green : ack.
2. Programming: • Brown: data (data from PlayStation 2) 1st i/o Input • Orange: Command. (Signal from MCU->PS2) • Grey : motor Power 7.2V-9V. (not use) • Black: ground.(Power) • Red: Power 3.3V->5.3V • Yellow: attention. (Signal from MCU->PS2) • Blue: clock. .(Signal from MCU->PS2) • While: none.(not use) • Green : ack.(not use)
PlayStation 2 Control 2. Programming: • Library • Playstation.h • Playstation.c • 2. Function • - configIOPS2() • - run_ps2() • 3. Variable • butLeft • butRight • but_right_left • but_start_select • but_delta_X • but_square_O • - but_up_down
PlayStation 2 Control 2. Programming: but_square_O but_delta_X but_start_select but_right_left butRight but_up_down butLeft
PlayStation 2 Control but_right_left =1 but_delta_X=2 but_up_down =2 but_square_O =2 but_square_O=1 but_right_left =2 but_up_down =1 but_delta_X=1 but_start_select =2 but_start_select =1
PlayStation 2 Control R butRight =2 butLeft =2 butRight =1 L butLeft =1
PlayStation 2 Control int main(void) { while(1) { Gamepad_setup(); read_data(); } }