Two-Axis Joystick
The Digilent PmodJSTK2 is a versatile user input device that can be easily incorporated into a wide variety of projects. With a two-axis joystick on a center button, a trigger button, and a programmable RGB LED capable of 24-bit color.
Functional Descriptions
The PmodJSTK2 utilizes two potentiometers oriented orthogonally to one another and are manipulated by moving the joystick in the X and Y directions. As the joystick moves, the voltage output at the sweep pin of each potentiometer changes and is measured by the 10-bit ADC present on the embedded PIC16F1618 microcontroller. The raw measured data is stored at a rate of 100 Hz as a 16-bit right-justified variable in RAM with the upper 6 bits masked with zeros.
Additionally, each successive measurement also produces two 8-bit values representative of the joysticks physical location with respect to each axis. Note that if inversion of either of the 8-bit position axis are set, the values will not change until the data has been re-collected by the PIC16 at the 100 Hz rate.
Interfacing with the Pmod
The PmodJSTK2 communicates with the host board via the SPI protocol. With the PmodJSTK2, there are two types of data packet protocols: the standard data packet of 5 bytes and an extended data packet with 6 or 7 bytes in total. With the standard 5 byte protocol, users may use the old code from the PmodJSTK without any syntax errors.
Physical Dimensions
The pins on the pin header are spaced 100 mil apart. The PCB is 1.875 inches long on the sides parallel to the pins on the pin header, 0.9375-inch-long on the sides perpendicular to the pin header, and 1.75 inches tall. With the 3- D printed housing the module is 1.875 inches long on the sides parallel to the pins on the pin header, 1.125 inches long on the sides perpendicular to the pin header, and 1.75 inches tall.