Difference between revisions of "Lab 2: Analog Sticks"

From Microlab Classes
Jump to navigation Jump to search
Line 4: Line 4:
 
Analog sticks or "joysticks" are input devices that encode a direction, like in game controllers. While aircraft had originally had rudder sticks that are purely mechanical in nature, the latest aircraft are too heavy to control via mechanical advantage alone and so such analog sticks also find use in them.
 
Analog sticks or "joysticks" are input devices that encode a direction, like in game controllers. While aircraft had originally had rudder sticks that are purely mechanical in nature, the latest aircraft are too heavy to control via mechanical advantage alone and so such analog sticks also find use in them.
  
[[File:AnalogStick.gif|frame| Some of the first most popular video games started in and with analog sticks as input, like Tekken.]]
+
[[File:AnalogStick.gif|412x200px|frame|Some of the first most popular video games started in and with analog sticks as input, like Tekken.]]
  
 
Knowing the direction being output by an analog stick such as U(p) D(own) L(eft) R(ight) or any combination thereof is important for a lot of things, like knowing which sprite animation to give Mario.
 
Knowing the direction being output by an analog stick such as U(p) D(own) L(eft) R(ight) or any combination thereof is important for a lot of things, like knowing which sprite animation to give Mario.

Revision as of 14:46, 25 February 2025

Background

Analog sticks or "joysticks" are input devices that encode a direction, like in game controllers. While aircraft had originally had rudder sticks that are purely mechanical in nature, the latest aircraft are too heavy to control via mechanical advantage alone and so such analog sticks also find use in them.

Some of the first most popular video games started in and with analog sticks as input, like Tekken.

Knowing the direction being output by an analog stick such as U(p) D(own) L(eft) R(ight) or any combination thereof is important for a lot of things, like knowing which sprite animation to give Mario.

The Mario sprite animations are simple combinational functions of the input directions

However, some analog sticks, like the one that can be found in Logisim, have a different encoding that do not necessarily correspond to U/D/L/R. This is because they can encode more than just the direction but also the magnitude of the displacement along a specific direction.

The Logisim Joystick (here with Bit Width = 2) uses a special encoding.

Instructions

Your assignment is as follows:

  1. Translate the encoding of the Logisim joystick into the U(p) D(own) L(eft) R(ight) encoding with a truth table.
  2. Translate the truth tables of the U/D/L/R outputs into K-Maps.
  3. Obtain minimal SOP and POS expressions for the U/D/L/R outputs using the K-Maps.