<< 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

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, 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?