®
PmodJSTK™
Reference Manual
www.digilentinc.com
Revision: September 22, 2008
215 E Main Suite D | Pullman, WA 99163
(509) 334 6306 Voice and Fax
Note: This document applies to REV C of the board.
Overview
The PmodJSTK was designed to be a versatile
user interface that can be used in a wide
variety of projects. It contains a resistive twin
axis joystick that includes a center push button
along with two additional push buttons. Also,
PmodJSTK has two programmable LEDs
located on the board that can provide
additional information to the user.
The PmodJSTK is ideally suited for Digilent
microcontroller or FPGA based projects that
required proportional control from the user,
such as robotic applications.
Functional Description
The joystick, located on the PmodJSTK,
contains two potentiometers which are
manipulated by moving the joystick in the X
and Y directions.
The PmodJSTK is equipped with an embedded
Atmel® ATtiny24 microcontroller in a MLF20
package. This microcontroller utilizes an
analog to digital converter to measure the
voltage occurring on the sweeper pins of each
of the two potentiometers. The voltage
occurring at these sweeper pins ranges from
ground potential to VCC depending on the
position of the joystick. A button is also
attached to the joystick and is activated by
pressing down directly on the joystick. The
joystick’s center button, along with the two
additional push buttons, is read by the
microcontroller.
Figure 1 PmodJSTK Circuit Diagram
The microcontroller assembles the joystick’s
positional data, along with the status of the
push buttons, in a series of five bytes. It
provides a 10-bit value for each axis of the
joystick. The joystick’s axis values are each
placed in 16-bit values, which are made up of
an upper byte and a lower byte.
Figure 2 Joystick Axis Map
Doc: 502-116
page 1 of 3
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.