<< Chapter < Page Chapter >> Page >
You will implement a multirate system that includes three fininte impulse response filters. The sample-rate compression and expansion factors can be controlled in real time using a MATLAB graphical user interface.

Implementation

Before implementing the entire system shown in Multirate Processing: Introduction , we recommend you design a system that consists of a cascade of filters FIR 1 and FIR 2 without thesample-rate compressor or expander. After verifying that the response of your two-filter system is correct, proceed toimplement the complete multirate system and verify its total response. At first, use fixed compression and expansionfactors of D U 4 . Later, you control this factor using a MATLAB interface; be sure to keep this in mind as you write yourcode.

Compressed-rate processing

In order to perform the processing at the lower sample rate, implement a counter in your code. Your counter willdetermine when the compressed-rate processing is to occur, and it can also be used to determine when to insert zerosinto FIR 3 to implement the sample-rate expander.

Some instructions that may be useful for implementing your multirate structure are the addm (add to memory) and bc (branch conditional) instructions. You may also find the banz (branch on auxiliary register not zero) and the b (branch) instruction useful.

Real-time rate change and matlab interface

A simple graphical user interface (GUI) is available (as mrategui.m , which requires ser_snd.m ) that sends a number between 1 and 10 to the DSP via the serial port. This canbe used to change the compression and expansion factor in real time.

Run the GUI by typing mrategui at the MATLAB prompt. A figure should automatically open up with a slideron it; adjusting the slider changes the compression and expansion factor sent to the DSP.

The assembly code that you have been given stores the last number that the DSP has received from the computer in thememory location labeled hold . Therefore, unless you have changed the serial portion of the givencode, you can find the last compression and expansion factor set by the GUI in this location. You need to modify yourcode so that each time a new number is received on the serial port, the compression and expansion factor ischanged. If a "1" is received on the serial port, the entire system should run at the full rate; if a "10" isreceived, the system should discard nine samples between each sample processed at the lower rate.

Note that the READSER and WRITSER macros, which are used to read data from and send data to the serial port, overwrite AR0 , AR1 , AR2 , and AR3 registers, as well as BK and the condition flag TC . You must therefore ensure that these registers are not used by your code, or that you save andrestore their values in memory before you call the READSER and WRITSER macros. Thiscan be done using the mvdm and mvmd instructions. The serial macros set up the AR1 and AR3 each time they are called, so there is no need to change these registers beforethe macros are called.

More detail about the READSER and WRITSER macros can be found in Core File: Serial Port Communication Between MATLAB and TI TMS320C54x .

Questions & Answers

what is mutation
Janga Reply
what is a cell
Sifune Reply
how is urine form
Sifune
what is antagonism?
mahase Reply
classification of plants, gymnosperm features.
Linsy Reply
what is the features of gymnosperm
Linsy
how many types of solid did we have
Samuel Reply
what is an ionic bond
Samuel
What is Atoms
Daprince Reply
what is fallopian tube
Merolyn
what is bladder
Merolyn
what's bulbourethral gland
Eduek Reply
urine is formed in the nephron of the renal medulla in the kidney. It starts from filtration, then selective reabsorption and finally secretion
onuoha Reply
State the evolution relation and relevance between endoplasmic reticulum and cytoskeleton as it relates to cell.
Jeremiah
what is heart
Konadu Reply
how is urine formed in human
Konadu
how is urine formed in human
Rahma
what is the diference between a cavity and a canal
Pelagie Reply
what is the causative agent of malaria
Diamond
malaria is caused by an insect called mosquito.
Naomi
Malaria is cause by female anopheles mosquito
Isaac
Malaria is caused by plasmodium Female anopheles mosquitoe is d carrier
Olalekan
a canal is more needed in a root but a cavity is a bad effect
Commander
what are pathogens
Don Reply
In biology, a pathogen (Greek: πάθος pathos "suffering", "passion" and -γενής -genēs "producer of") in the oldest and broadest sense, is anything that can produce disease. A pathogen may also be referred to as an infectious agent, or simply a germ. The term pathogen came into use in the 1880s.[1][2
Zainab
A virus
Commander
Definition of respiration
Muhsin Reply
respiration is the process in which we breath in oxygen and breath out carbon dioxide
Achor
how are lungs work
Commander
where does digestion begins
Achiri Reply
in the mouth
EZEKIEL
what are the functions of follicle stimulating harmones?
Rashima Reply
stimulates the follicle to release the mature ovum into the oviduct
Davonte
what are the functions of Endocrine and pituitary gland
Chinaza
endocrine secrete hormone and regulate body process
Achor
while pituitary gland is an example of endocrine system and it's found in the Brain
Achor
what's biology?
Egbodo Reply
Biology is the study of living organisms, divided into many specialized field that cover their morphology, physiology,anatomy, behaviour,origin and distribution.
Lisah
biology is the study of life.
Alfreda
Biology is the study of how living organisms live and survive in a specific environment
Sifune
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Dsp laboratory with ti tms320c54x. OpenStax CNX. Jan 22, 2004 Download for free at http://cnx.org/content/col10078/1.2
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Dsp laboratory with ti tms320c54x' conversation and receive update notifications?

Ask