EasyManuals Logo

Texas Instruments C28 Series Student Guide

Texas Instruments C28 Series
342 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #297 background imageLoading...
Page #297 background image
Lab B: Addressing
Lab B: Addressing
Objective
The objective of this lab is to practice and verify the mechanics of addressing. In this process we
will expand upon the ASM file from the previous lab to include new functions. Additionally, we
learn how to run and observe the operation of code using Code Composer Studio.
In this lab, we will initialize the “vars” arrays allocated in the previous lab with the contents of
the “const” table. How is this best accomplished? Consider the process of loading the first
“const” value into the accumulator and then storing this value to the first “vars” location,
and repeating this process for each of the succeeding values.
What forms of addressing could be used for this purpose?
Which addressing mode would be best in this case? Why?
What problems could arise with using another mode?
Procedure
Copy Files, Create Project File
1. Create a new project called LabB.pjt in C:\C28x\Labs\Appendix\LabB and add
LabB.asm, and LabB.cmd to it. Check your file list to make sure all the files are there.
Be sure to setup the Build Options by clicking: Project Build Options on the
menu bar. Select the Linker tab. In the middle of the screen select “No
Autoinitialization” under “Autoinit Model:”. Create a map file by typing
.\Debug\LabB.map in the Map Filename [-m] field. Enter start in the
“Code Entry Point (-e):” field. Next, select the Compiler tab. Note that “Full
Symbolic Debug (-g)” under “Generate Debug Info:” is selected. Then
select OK to save the Build Options.
Initialize Allocated RAM Array from ROM Initialization Table
2. Edit LabB.asm and modify it to copy table[9] to data[9] using indirect addressing. (Note:
data[9] consists of the allocated arrays of data, coeff, and result). Initialize the allocated
RAM array from the ROM initialization table:
Delete the NOP operations from the “code” section.
Initialize pointers to the beginning of the “const” and “vars” arrays.
Transfer the first value from “const” to the “vars” array.
Repeat the process for all values to be initialized.
To perform the copy, consider using a load/store method via the accumulator. Which part of an
accumulator (low or high) should be used? Use the following when writing your copy routine:
- use AR1 to hold the address of table
- use AR2 to hold the address of data
3. It is good practice to trap the end of the program (i.e. use either “end: B end,UNC” or
“end: B start,UNC”). Save your work.
C28x - Appendix B - Addressing Modes B - 15

Table of Contents

Other manuals for Texas Instruments C28 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments C28 Series and is the answer not in the manual?

Texas Instruments C28 Series Specifications

General IconGeneral
BrandTexas Instruments
ModelC28 Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals