Iowa State University

CPRE 288 Laboratory


Lab 4: Memory Mapped I/O

Lecture - Lab Connection

In lecture, you have studied memory mapped I/O and the concept of API (application programming interface) functions. The general purpose input/output pins (GPIO) are grouped into sets of 8 pins, called ports. You will use these concepts and the related skills to develop functionality that allows a person to interact with a running program through push buttons and other devices.

Prelab

  • Read through the lab description, including the linked documents.
  • Skim the reference documents below. Browse the table of contents of the Tiva TM4C123GH6PM Datasheet chapters 1, 10, 22 and 23. Chapter 10 covers the GPIO module. Similar information is covered in the textbook (e.g., chapter 2, sections 2.6.1, 2.6.2.3, 2.6.3; chapter 4, sections 4.5.7.1-4.5.7.2.4; chapter 7, sections 7.1-7.3). Note: Your goal is to be aware of information so that you can find and read it in more detail if and when needed.
  • Read through the source code for botton.c & lab4_template.c.

Reference Documents

All reference documents are also available on the Resources page of the course website.

Reference Files

Download the following files to a single folder your U: drive. (Right-click and select 'Save Target As')

  • lcd.c: A program file with a number of LCD functions.
  • lcd.h: The header file for lcd.c
  • Timer.c: This file contains wait functions.
  • Timer.h: The header file for Timer.c
  • button.c: This file contains functions which you must implement during this lab, and will be necessary for future labs.
  • button.h: The header file for button.c
  • cyBot_uart.h: Header for pre-compiled CyBot/Human UART communication
  • libcybotUART.lib: Pre-compiled Library for CyBot/Human UART communication (Note: Must change extension from .txt to .lib after copying, Do not try to open file as it will corrupt the file causing a Linker error)
  • lab4_template.c: This file contains a main as well as function templates which you must implement during this lab.

Notes

  • TBA

Lab 4 Description

  • Lab 4 Manual: A detailed description of the objectives to complete for Lab 4

Cautions

Turn the power to the cyBOT platform off before charging. The Launchpad board consumes power and the battery will not charge if the robot is in full_mode (which it enters after calling oi_init, turning the power LED yellow). You will have to turn off open interface. The robot is charging when the robot's power LED is pulsing red and both green LEDS on the dock are lit.

Reference Files

Files Description
TM4C123GH6PM Datasheet Datasheet for the Cybot Platform Microcontroller.
Cybot Baseboard Schematic for the Cybot Baseboard PCB.
Cybot LCD Board Schematic for the Cybot LCD host PCB.
Online Feedback Form Tell us what you think of the lab (feedback forms)