<< Chapter < Page Chapter >> Page >

After you have the filter coefficients, take the two’s complement by using twocomplement.m . You need them in that format in order to use them in the A/D-D/A conversion. Make sure you divide the coefficients by two before taking the two’s complement. To include them in your file, use the save_coeff.m function to create an assembly file.

Download the following files to give you a good starting point: [Insert code files here]Read through the files and give a brief description of each one.

Got questions? Get instant answers now!

Serial peripheral interface (spi)

The serial peripheral interface (SPI) is a high-speed synchronous serial input/output (I/O) port that allows a serial bit stream of programmed length (1-16 bits) to be shifted into and out of the device at a programmed bit-transfer rate. The SPI is normally used for communications between the DSP controller and external peripherals, the DAC in our case, or another controller.

To implement the FIR filter, the DSP must be set up to communicate with the DAC on the daughtercard. Set up the SPI registers on the F2812 DSP by assigning the following values to the corresponding registers:

Register Name Register Value (HEX)
SPICCR.all 0x005F
SPICTL.all 0x001F
SPISTS.all 0x0000
SPIBRR.all 0x0002
SPIFFTX.all 0xC028
SPIFFRX.all 0x0028
SPIFFCT.all 0x00
SPIPRI.all 0x0010

Which register is set to:

  • Enable the FIFOs?
  • Have the SPI interrupt-driven?
  • The SPI bit transfer rate?

Got questions? Get instant answers now!

Analog-to-digital converter (adc)

The F2812 DSP has a 12-bit ADC core with built-in dual sample-and-hold (S/H). Its options include:

  • Simultaneous sampling or sequential sampling mode
  • Operating as two independent 8-state sequencers or as a one large 16-state sequencer
  • 16-channel, multiplexed inputs
  • Multiple source triggers for the start-of-conversion (SOC) sequence

A block diagram of the ADC module from TI documents:

Texas Instruments' ADC Block Diagram

Set the following ADC registers as follows:

Register Name Register Value (HEX)
AdcRegs.ADCMAXCONV.all 0x0001
AdcRegs.ADCCHSELSEQ1.bit.CONV00 0x3
AdcRegs.ADCCHSELSEQ1.bit.CONV01 0x2
AdcRegs.ADCTRL2.bit.EVA_SOC_SEQ1 1
AdcRegs.ADCTRL2.bit.INT_ENA_SEQ1 1
Which register enables or:
  • Sequential sampling?
  • 16-bit cascaded mode?
  • Event manager A to be the source trigger for the SOC sequence?
  • Selects ADCIN3 and ADCIN2 for input channels?
  • Does one conversion on the sequence?
Which 16 registers does the ADC place its results?

Got questions? Get instant answers now!

Event manager a (eva)

The event manager peripheral in the DSP includes general-purpose (GP) timers, full-compare/PWM units, capture units, and quadrature-encoder pulse (QEP) circuits. You will use event manager A (EVA) to trigger the SOC sequence in the ADC.

EVA functional diagram from TI documents:

Texas Instruments' EVA Functional Overview

Set the following EVA registers as follows and describe what each one will do:

Register Name Register Value (HEX)
EvaRegs.T1CMPR 0x00fa
EvaRegs.T1PR 0x1f4
EvaRegs.T1CON.all 0x1043

Got questions? Get instant answers now!


Interrupts, as described by Dr. Choi in one of his lab manuals in ELEC 434, provide a mechanism for handling any infrequent or exception event. The interrupt causes a CPU to make a temporary transfer of control from its current location to another location that services the event. Variety of sources, internal and external to the CPU, can generate interrupts. The use of interrupts greatly increases the performance of the CPU by allowing the I/O devices direct and rapid access to the CPU and by freeing the CPU from the task of continually testing the status of its I/O devices. The I/O devices assert interrupts to request the CPU to start a new I/O operation, to signal the completion of an I/O operation, and to signal the occurrence of hardware and software errors.

The F2812 DSP supports one nonmaskable interrupt (NMI) and 16 maskable prioritized interrupt requests (INT1-INT14, RTOSINT, and DLOGINT) at the CPU level.

Program the interrupts for the ADC and the SPI along with the functions for:

  • Two’s complement of the ADC output
  • Send to appropriate filter
  • Filter’s output to be reconverted to unsigned integers
  • Send to DAC
You should hear the filtered audio through the speakers.

Got questions? Get instant answers now!

Questions & Answers

What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
Stoney Reply
why we need to study biomolecules, molecular biology in nanotechnology?
Adin Reply
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
what school?
biomolecules are e building blocks of every organics and inorganic materials.
anyone know any internet site where one can find nanotechnology papers?
Damian Reply
sciencedirect big data base
Introduction about quantum dots in nanotechnology
Praveena Reply
what does nano mean?
Anassong Reply
nano basically means 10^(-9). nanometer is a unit to measure length.
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
Damian Reply
absolutely yes
how to know photocatalytic properties of tio2 nanoparticles...what to do now
Akash Reply
it is a goid question and i want to know the answer as well
characteristics of micro business
for teaching engĺish at school how nano technology help us
Do somebody tell me a best nano engineering book for beginners?
s. Reply
there is no specific books for beginners but there is book called principle of nanotechnology
what is fullerene does it is used to make bukky balls
Devang Reply
are you nano engineer ?
fullerene is a bucky ball aka Carbon 60 molecule. It was name by the architect Fuller. He design the geodesic dome. it resembles a soccer ball.
what is the actual application of fullerenes nowadays?
That is a great question Damian. best way to answer that question is to Google it. there are hundreds of applications for buck minister fullerenes, from medical to aerospace. you can also find plenty of research papers that will give you great detail on the potential applications of fullerenes.
what is the Synthesis, properties,and applications of carbon nano chemistry
Abhijith Reply
Mostly, they use nano carbon for electronics and for materials to be strengthened.
is Bucky paper clear?
carbon nanotubes has various application in fuel cells membrane, current research on cancer drug,and in electronics MEMS and NEMS etc
so some one know about replacing silicon atom with phosphorous in semiconductors device?
s. Reply
Yeah, it is a pain to say the least. You basically have to heat the substarte up to around 1000 degrees celcius then pass phosphene gas over top of it, which is explosive and toxic by the way, under very low pressure.
Do you know which machine is used to that process?
how to fabricate graphene ink ?
for screen printed electrodes ?
What is lattice structure?
s. Reply
of graphene you mean?
or in general
in general
Graphene has a hexagonal structure
On having this app for quite a bit time, Haven't realised there's a chat room in it.
what is biological synthesis of nanoparticles
Sanket Reply
what's the easiest and fastest way to the synthesize AgNP?
Damian Reply
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Berger describes sociologists as concerned with
Mueller Reply
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!

Source:  OpenStax, High-speed and embedded systems design (under construction). OpenStax CNX. Feb 18, 2004 Download for free at http://cnx.org/content/col10212/1.12
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'High-speed and embedded systems design (under construction)' conversation and receive update notifications?