DOC PREVIEW
MIT 6 111 - Motion Code Tables

This preview shows page 1-2-3-4-5-6-7-8-57-58-59-60-61-62-63-64-115-116-117-118-119-120-121-122 out of 122 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 122 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

AppendixAppendix Motion Code Tables Table 1. Gesture code descriptions. Combinations of acceleration and gyroscope codes result in particular gesture codes specifying the audio effect to the audio system. Gesture Code Acceleration Code Gyroscope Code Description 0 0 0 Nothing 1 9, 10 0 Volume up 2 11, 12 0 Volume down 3 1, 2 0 Low-pass filter 4 3, 4 0 High-pass filter 5 0 1 Clip0 6 0 2 Clip1 7 0 3 Clip2 8 0 4 Clip3 9 0 5 Clip4 10 0 6 Clip5 11 0 7 Clip6 12 0 8 Clip7 13 5, 6, 7, 8 0 Increment play slot 14 13, 14, 15, 16 0 Nothing Table 2. Acceleration code descriptions. The unit can infer 17 different combinations of translational motion from the two paddles. Acceleration Code Left Hand Right Hand 0 1 Left 2 Right 3 Left 4 Right 5 Left Left 6 Right Right 7 Left Right 8 Right Left 9 Up 10 Down 11 Up 12 Down 13 Up Up 14 Down Down 15 Up Down 16 Down UpTable 3. Gyroscope code descriptions. The unit can infer 9 different combinations of rotational motion from the two paddles. Gyroscope Code Left Hand Right Hand 0 1 Clockwise 2 Counterclockwise 3 Clockwise 4 Counterclockwise 5 Clockwise Clockwise 6 Counterclockwise Counterclockwise 7 Counterclockwise Clockwise 8 Clockwise Counterclockwise Verilog Code `timescale 1ns / 1ps ////////////////////////////////////////////////////////////////////////////////// // // Acceleration Decoder // // This unit receives as input the average of the past 8 accelerations along // the x, y, and z axis for the right hand and the left hand. It decodes these // acceleration values into an acceleration code corresponding to the action // that has been sensed. The unit waits in the idle state until it receives // a request from the master FSM for an acceleration code upon which it // performs all the necessary calculations to arrive at an acceleration code. // // Code | Left | Right // -----|-------|------ // 0 | X | X // 1 | left | X // 2 | right | X// 3 | X | left // 4 | X | right // 5 | left | left // 6 | right | right // 7 | left | right // 8 | right | left // 9 | up | X // 10 | down | X // 11 | X | up // 12 | X | down // 13 | up | up // 14 | down | down // 15 | up | down // 16 | down | up // // In the table above, X indicates no movement. // //////////////////////////////////////////////////////////////////////////////// module accel_decoder(clock, reset_sync, left_accel_x, left_accel_y, left_accel_z, right_accel_x, right_accel_y, right_accel_z, request, busy, accel_code); input clock; input reset_sync; input [7:0] left_accel_x; input [7:0] left_accel_y; input [7:0] left_accel_z; input [7:0] right_accel_x; input [7:0] right_accel_y; input [7:0] right_accel_z;input request; output reg busy; output reg [4:0] accel_code; reg [1:0] state, next; //threshold values parameter min_accel_x = 4; parameter min_accel_y = 3; parameter zero_bias_x = 85; parameter zero_bias_y = 65; //states parameter IDLE = 0; parameter decode = 1; //state assignment always @ (posedge clock) begin if (reset_sync) state <= IDLE; else state <= next; end //next state computation always @ (state or request or left_accel_x or left_accel_y or left_accel_z or right_accel_x or right_accel_y or right_accel_z) begin busy = 0; case (state) IDLE: begin if (request) next = decode; else next = IDLE; accel_code = 0; end decode: begin next = IDLE; busy = 1; if ((right_accel_y > zero_bias_y+min_accel_y) & (left_accel_y > zero_bias_y+min_accel_y)) // both hands moving up accel_code = 13;else if ((right_accel_y < zero_bias_y-min_accel_y) & (left_accel_y < zero_bias_y-min_accel_y)) // both hands moving down accel_code = 14; else if ((right_accel_y > zero_bias_y+min_accel_y) & (left_accel_y < zero_bias_y-min_accel_y)) // RH up, LH down accel_code = 16; else if ((right_accel_y < zero_bias_y-min_accel_y) & (left_accel_y > zero_bias_y+min_accel_y)) // RH down, LH up accel_code = 15; else if (right_accel_y > zero_bias_y+min_accel_y) // only RH up accel_code = 11; else if (right_accel_y < zero_bias_y-min_accel_y) // only RH down accel_code = 12; else if (left_accel_y > zero_bias_y+min_accel_y) // only LH up accel_code = 9; else if (left_accel_y < zero_bias_y-min_accel_y) // only LH down accel_code = 10; else if ((right_accel_x > zero_bias_x+min_accel_x) & (left_accel_x > zero_bias_x+min_accel_x)) // both hands right accel_code = 6; else if ((right_accel_x < zero_bias_x-min_accel_x) & (left_accel_x < zero_bias_x-min_accel_x)) // both hands left accel_code = 5; else if ((right_accel_x > zero_bias_x+min_accel_x) & (left_accel_x < zero_bias_x-min_accel_x)) // RH right, LH left accel_code = 7; else if ((right_accel_x < zero_bias_x-min_accel_x) & (left_accel_x > zero_bias_x+min_accel_x)) // RH left, LH right accel_code = 8; else if (right_accel_x > zero_bias_x+min_accel_x) // only RH right accel_code = 4; else if (right_accel_x < zero_bias_x-min_accel_x) // only RH left accel_code = 3; else if (left_accel_x > zero_bias_x+min_accel_x) // only LH right accel_code = 2; else if (left_accel_x < zero_bias_x-min_accel_x) // only LH left accel_code = 1; end default: begin next = IDLE; endendcase end endmodule `timescale 1ns / 1ps ////////////////////////////////////////////////////////////////////////////////// // Accelerator Numbers Unit // // This unit instantiates and connects the accelerator processor and the six // BRAM units used to store samples from the accelerators. // //////////////////////////////////////////////////////////////////////////////// module accel_num(clock, reset_sync, enable, left_accel_x, left_accel_y, left_accel_z, right_accel_x, right_accel_y, right_accel_z, ADbusy, convst_b, rd_b, left_accel_x_out, left_accel_y_out, left_accel_z_out, right_accel_x_out, right_accel_y_out, right_accel_z_out, left_val_x, left_read_val_x, left_sum_x, state); input clock; input reset_sync; input enable; input [7:0] left_accel_x; input [7:0] left_accel_y; input [7:0] left_accel_z; input [7:0] right_accel_x; input [7:0] right_accel_y; input [7:0]


View Full Document

MIT 6 111 - Motion Code Tables

Documents in this Course
Verilog

Verilog

21 pages

Video

Video

28 pages

Bass Hero

Bass Hero

17 pages

Deep 3D

Deep 3D

12 pages

SERPENT

SERPENT

8 pages

Vertex

Vertex

92 pages

Vertex

Vertex

4 pages

Snapshot

Snapshot

15 pages

Memories

Memories

42 pages

Deep3D

Deep3D

60 pages

Design

Design

2 pages

Frogger

Frogger

11 pages

SkiFree

SkiFree

81 pages

Vertex

Vertex

10 pages

EXPRESS

EXPRESS

2 pages

Labyrinth

Labyrinth

81 pages

Load more
Download Motion Code Tables
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Motion Code Tables and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Motion Code Tables 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?