Tiva Lab 14: Using Joystick to Control RC Servo Rotation

Objective

  • To learn how to configure the ADC module
  • To learn how to convert the ADC value to pulse width in order to control the Servo arm's rotation

Required Reading Material

 

Background Information

How the Joystick works

The joystick has two potentiometers that allow us to measure the movement of the stick in two-dimension: one for the vertical movement (Y-axis) and other for the horizontal movement (X-axis). The joystick also comes with a Select switch. It can be very handy for retro gaming, robot control or RC cars.

The microcontroller can not directly read the resistance value (analog signal) from poteniometer, it must be converted to digital value. The Analog-to-Digital Convert (ADC) is the only device which can convert the analog voltage into a digital value.

 

Required Components List

x 1

    x 1
    x 1

 

Circuit Diagram

 

 

 

 

Procedure

Procedure can have as many steps as needed per experiment. A checkbox for instructor's initials, stamp, etc. should be provided next to each step, in order to easily track individual student's progress.

 

Configurations

 

Lab Experiments

  

Questions

Around five questions should be based on Required Reading Material. Two more challenging questions will require students to perform additional research for extra credit points

 


Exercises

Program Implementation will require code submission.

Submit your completed project report including your working code.