<< Chapter < Page Chapter >> Page >

Timer_A ISR begins by activating LED2, indicating the beginning of execution of the routine and then switches LED1 state. The counters are updated in cascade and their contents are used to update the LCD, through the routines LCD_msec() , LCD_sec() and LCD_min() . The routine ends by switching the state of the clock separation points. Finally, LED2 is turned off.

System configuration

Watchdog timer

The Watchdog Timer is disabled with the objective of reducing energy consumption, but giving up the protection afforded by it. This peripheral is configured by the WDTCTL register. Its access is protected by a password. The value to disable it:


Fll+ configuration

A 32.768 kHz crystal is applied to the oscillator LFXT1. Since it is possible to select the internal capacitors using software, what is the value to write to the FLL_CTL0 configuration register to select the 8 pF capacitors?

FLL_CTL0 |= XCAP18PF; // Set load cap for 32k xtal

Led ports configuration

LED1 and LED2 are connected to ports P2.2 and P2.1 respectively. How should they be configured so that just the bits related to these ports have digital output functions?

P2DIR |= 0x06; // P2.2 and P2.1 as output

How should the P2OUT register be configured so that the application starts with LED1 on and LED2 off?

P2OUT |= 0x04; // LED1 on and LED2 off

Timer_a configuration

The Timer_A is configured to count until it reaches the value written in the TACCR0 unit. An interrupt is generated when it reaches that value. Which is the interrupt vector to use? ____________

Timer_A clock signal is the ACLK without division. What is the value to write in the configuration register?

TACTL = TASSEL_1 | MC_1 | ID_0; // ACLK, up mode

The TACCR0 capture/compare unit determines the Timer_A counting range. For a 100 msec response, what is the value to write in the register?

TACCR0 = 3268; // this count corresponds to 100 msec

The interrupt is configured in TACCR0 capture/compare unit. What is the value to write to the following register?

TACCTL0 = CCIE; // TACCR0 interrupt enabled //*********************************************************// Timer A ISR //*********************************************************#pragma vector=TIMERA0_VECTOR __interrupt void TimerA0_ISR (void){ P2OUT |=0x02; // LED1 turn onP2OUT ^=0x04; // LED2 tooglemsec++; LCD_msec();if (msec == 10){ msec = 0;sec++; LCD_sec();if (sec == 60) {sec = 0; min++;LCD_min(); if (min == 60){ min = 0;} }}if (sec&0x01) // toogle clock dots {P3_DOT_ON; P5_DOT_ON;} else{ P3_DOT_OFF;P5_DOT_OFF; }P2OUT&=~ 02; // LED1 turn off }

Low power mode

BIS_SR(LPM3_bits + GIE); // LPM3 with interrupts enable

Analysis of operation

Isr execution time

Performing similar procedures to those described in laboratory Timers: Lab1 - Memory clock with Basic Timer1 measure the ISR execution time. What is the value measured?

LCD refresh: ______

The LCD write routines were changed. Taking advantage of storing the data in the BCD format, the division operation can be ignored, resulting in the reduction of execution time of the Basic Timer1 ISR. Is the processing time required to refresh the LCD constant? _____

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

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.
what is the stm
Brian Reply
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
scanning tunneling microscope
how nano science is used for hydrophobicity
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
what is differents between GO and RGO?
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
what is Nano technology ?
Bob Reply
write examples of Nano molecule?
The nanotechnology is as new science, to scale nanometric
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
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
How can I make nanorobot?
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
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, 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?