<< Chapter < Page Chapter >> Page >
TACTL = TASSEL_2 |MC_2 | ID_0 | TAIE; // SMCLK // up mode to 0xFFFF

The capture unit captures the TAR register value to the TACCR1 register when it detects a low-to-high transition at the TA1 input. What is the value to write to the configuration register?

TACCTL1 = CCIS_0 | CAP | CCIE; // Capture on rising edge,// TACCR1 input signal selected, // Capture mode,// Capture/compare interrupt enable.

Determine the maximum and minimum frequency values detected. Note that these values do not take into account the execution time of the application. The PWM signals should be applied at frequencies well below the maximum value determined.

Maximum frequency value: ____________

Minimum frequency value: _____________

The TACCR1 capture unit is configured to generate an interrupt when it detects a low-to-high transition. What is the value to write to the configuration register?

TACCTL1 |= CM1

Ports p3.5/tb4 and p1.2/ta1 configuration

These ports perform special functions. Thus, the Port P3.5 is configured as an output, selected by the special function TB4, with the values:

// TB4 configuration (Port3) P3SEL = 0x20; // P3.5 as special function (TB4)P3DIR = 0x20; // P3.5 as output

The Port P1.2 is configured as input, with the special function TA1, using the values:

// TA1 (TACCR1) configuration (Port1) P1SEL = 0x04; // P1.2 as special function (TA1)P1DIR = 0x00; // P1.2 as input

I/o ports configuration:

// SW1 and SW2 configuration (Port1) P1SEL&= 0x00; // P1.0 and P1.2 I/O P1DIR&= 0x00; // P1.0 and P1.2 as inputs P1IFG = 0x00;P1IES&= 0xFF // high-to-low transition interrupt P1IE |= 0xFF; // enable port interrupts// LED1 and LED2 configuration (Port2):P2DIR |= 0x06; // P2.2 and P2.1 as outputs P2OUT = 0x04; // LED1 on and LED2 off// Buzzer port configuration (Port3)P3SEL |= 0x20; // P3.5 as special function P3DIR |= 0x20; // P3.5 as digital output

Analysis of operation

Run the application using the frequency generator based on timer_b

Without a frequency generator, the Timer_B generates a PWM signal at the TBCCR4 unit output that can be fed back to Timer_A TACCR1 capture unit input. These two pins must therefore be connected together. By default, the PWM signal frequency is 200 Hz. Add a breakpoint at the line of code belonging to the Basic Timer1 ISR to modify this value.

TBCCR0 = 7995392/read_data;

If the variable read_data has the value 200, it will generate a 200 Hz frequency. The value of this variable can be changed by associating a breakpoint to that line of code. Before the line of code is executed, the value of the data file is read and assigned to the variable read_data . The signal will oscillate at the desired frequency, loading the value in TBCCR0. The breakpoint configuration is as follows:

- Action: read data from file

- File: address of the data file (example in freq.txt)

- Wrap Around: activate this option to restart reading at the beginning

- Start address:&read_data

- Length: 1 in order to read a value from the file each time

Run the application using a frequency generator

The operation of the application can be verified using a frequency generator. The generator should generate a PWM signal with voltage and frequency values compatible with the device’s input (2.5 to 3.3 volts).

Observe the measured frequency

The PWM signal applied to the TA1 input can be viewed using an oscilloscope, connected to pin 3 of Header 2. Perform this task and confirm the values present at the LCD.

Measurement of electrical current drawn

The power consumption was discussed in the previous point. The electrical power required by the system during operation is measured by replacing the jumper on the Header PWR1 by an ammeter, which indicates the electric current taken by device during operation.

What is the value read? __________

This example and many others are available on the MSP430 Teaching ROM.

Request this ROM, and our other Teaching Materials here (External Link)

Questions & Answers

how can chip be made from sand
Eke Reply
is this allso about nanoscale material
Almas
are nano particles real
Missy Reply
yeah
Joseph
Hello, if I study Physics teacher in bachelor, can I study Nanotechnology in master?
Lale Reply
no can't
Lohitha
where is the latest information on a no technology how can I find it
William
currently
William
where we get a research paper on Nano chemistry....?
Maira Reply
nanopartical of organic/inorganic / physical chemistry , pdf / thesis / review
Ali
what are the products of Nano chemistry?
Maira Reply
There are lots of products of nano chemistry... Like nano coatings.....carbon fiber.. And lots of others..
learn
Even nanotechnology is pretty much all about chemistry... Its the chemistry on quantum or atomic level
learn
Google
da
no nanotechnology is also a part of physics and maths it requires angle formulas and some pressure regarding concepts
Bhagvanji
hey
Giriraj
Preparation and Applications of Nanomaterial for Drug Delivery
Hafiz Reply
revolt
da
Application of nanotechnology in medicine
has a lot of application modern world
Kamaluddeen
yes
narayan
what is variations in raman spectra for nanomaterials
Jyoti Reply
ya I also want to know the raman spectra
Bhagvanji
I only see partial conversation and what's the question here!
Crow Reply
what about nanotechnology for water purification
RAW Reply
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
Damian
yes that's correct
Professor
I think
Professor
Nasa has use it in the 60's, copper as water purification in the moon travel.
Alexandre
nanocopper obvius
Alexandre
what is the stm
Brian Reply
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
LITNING Reply
what is a peer
LITNING Reply
What is meant by 'nano scale'?
LITNING Reply
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
Rafiq
if virus is killing to make ARTIFICIAL DNA OF GRAPHENE FOR KILLED THE VIRUS .THIS IS OUR ASSUMPTION
Anam
analytical skills graphene is prepared to kill any type viruses .
Anam
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
Hafiz
what is Nano technology ?
Bob Reply
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
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
Good
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, Teaching and classroom laboratories based on the “ez430” and "experimenter's board" msp430 microcontroller platforms and code composer essentials. OpenStax CNX. May 19, 2009 Download for free at http://cnx.org/content/col10706/1.3
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Teaching and classroom laboratories based on the “ez430” and "experimenter's board" msp430 microcontroller platforms and code composer essentials' conversation and receive update notifications?

Ask