Docsity

Microprocessors Lab 2: PIO Devices and Assembly Language Programming, Lab Reports of Microprocessors

Toggle sidebar
bg1
ECE 332L
Microprocessors Lab Lab 2
Spring 2008
PIO Devices
Page 1 of 1
C:\ece332\labs\lab2\docs\Lab2.doc
Objective: In this lab, you will learn about the PIO core and advance your assembly language
programming skills.
The DE2 utilizes the PIO core for the LEDs (green and red), switches, buttons and potentially other
devices. The PIO core provides a very good way to interface many digital I/O devices to the NIOS II
processor. This is a good place to start after the memory devices. Additionally we will extend our
understanding of assembly language programming by studying subroutines and macros.
To prepare for this lab you might want to find out a little more about the hardware that you will be
dealing with. The devices that we will be dealing with in this lab fall into the category of PIO
(parallel input/output) devices. You can read more about them in the “Quartus II Version 7.1
Handbook – Volume 5: Embedded Peripherals”. Section V – Chapter 13 covers the PIO Core.
Reviewing this documentation and paying special attention to the Register Map section (page 13-7)
should provide more insight into the operation of these devices.
Pre-Lab: Complete the following reading before coming to lab next week.
Reading from N2PRH n2cpu_niiv1.pdf
Chapter 7. JTAG UART Core and Avalon Interface
Chapter 13. PIO Core
New Instructions to research (ISR)
Break, call / ret, srli, andi, slli, nor, and, or
New Directives to research
.org, .include, .macro, .endm
Resources:
lab2.sof, lab2.ptf
Altera DE2 Development Board
Altera Debug Client (Quartus II Programmer)
Deliverables:
Create a program that utilizes the red LEDs to show a progress motion. Then utilize a switch that will
change the direction of the motion and a switch that will stop the motion. For extra credit utilize a
button to change motion direction.
Grading: 80% if routine works. Grades above this will require usage of layers with function calls to
isolate devices from top level logic and usage of macros to make routines more readable.
Date Due: Demonstration at beginning of lab 2-12-08, and report (project files and readme) emailed
before midnight 2-12-08.
All project files with readme.txt must be submitted as lab2_Group??.zip (no other formats) file for
full credit.
Email to [email protected] with subject containing “Lab 2 – Group ??”

Partial preview of the text

Download Microprocessors Lab 2: PIO Devices and Assembly Language Programming and more Lab Reports Microprocessors in PDF only on Docsity!

ECE 332L Microprocessors Lab Lab 2

Spring 2008 PIO Devices

Page 1 of 1

C:\ece332\labs\lab2\docs\Lab2.doc

Objective: In this lab, you will learn about the PIO core and advance your assembly language programming skills.

The DE2 utilizes the PIO core for the LEDs (green and red), switches, buttons and potentially other devices. The PIO core provides a very good way to interface many digital I/O devices to the NIOS II processor. This is a good place to start after the memory devices. Additionally we will extend our understanding of assembly language programming by studying subroutines and macros.

To prepare for this lab you might want to find out a little more about the hardware that you will be dealing with. The devices that we will be dealing with in this lab fall into the category of PIO (parallel input/output) devices. You can read more about them in the “Quartus II Version 7. Handbook – Volume 5: Embedded Peripherals”. Section V – Chapter 13 covers the PIO Core. Reviewing this documentation and paying special attention to the Register Map section (page 13-7) should provide more insight into the operation of these devices.

Pre-Lab: Complete the following reading before coming to lab next week.

Reading from N2PRH n2cpu_niiv1.pdf Chapter 7. JTAG UART Core and Avalon Interface Chapter 13. PIO Core

New Instructions to research (ISR)

Break, call / ret, srli, andi, slli, nor, and, or

New Directives to research

.org, .include, .macro, .endm

Resources :

lab2.sof, lab2.ptf Altera DE2 Development Board Altera Debug Client (Quartus II Programmer)

Deliverables:

Create a program that utilizes the red LEDs to show a progress motion. Then utilize a switch that will change the direction of the motion and a switch that will stop the motion. For extra credit utilize a button to change motion direction.

Grading: 80% if routine works. Grades above this will require usage of layers with function calls to isolate devices from top level logic and usage of macros to make routines more readable.

Date Due: Demonstration at beginning of lab 2-12-08, and report (project files and readme) emailed before midnight 2-12-08.

All project files with readme.txt must be submitted as lab2_Group??.zip (no other formats) file for full credit.

Email to [email protected] with subject containing “Lab 2 – Group ??”