Creating a Program That Blinks the Leds on the Board

In: Computers and Technology

Submitted By Nirooo
Words 803
Pages 4
Creating a Program that Blinks the LEDs on the Board 1- Create a new project and copy and paste the following code in the main.c file of your project.
//***************************************************************************************
// MSP430 Blink the LED Demo - Software Toggle P1.0
//
// Description; Toggle P1.0 by xor'ing P1.0 inside of a software loop.
// ACLK = n/a, MCLK = SMCLK = default DCO
//
// MSP430x5xx
// -----------------
// /|\| XIN|-
// | | |
// --|RST XOUT|-
// | |
// | P1.0|-->LED
//
// J. Stevenson
// Texas Instruments, Inc
// July 2011
// Built with Code Composer Studio v5
//***************************************************************************************

#include <msp430.h>

int main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer P1DIR |= 0x01; // Set P1.0 to output direction

for (;;) { volatile unsigned int i; // volatile to prevent optimization

P1OUT ^= 0x01; // Toggle P1.0 using exclusive-OR

i = 10000; // SW Delay do i--; while (i != 0); }
}

2- Google the “for” and “while” loops in C++ and describe how they work here. We will use them very often in programming.

Answer: * For loop is used like an infinite loop and it helps for doing same blinking task recursively. * While loop is used to implement a very crude delay loop and the actual length of the delay can vary significantly. (Delay between LED toggles)

3- What the line “P1OUT ^= 0x01” is doing?

Answer: * P1OUT ^= 0x01 means P1OUT = 0x01 XOR 0x01 * Then, P1OUT = 0x00

4- How much do you guess we can increase i in the…...

Similar Documents

Eye Blink Sensor

...EYE BLINK SENSOR & ACCIDENT PREVENTION Abstract: Description: The Objective of this project is to develop a system to keep the vehicle secure and protect it by the occupation of the intruders. Scope: We can’t take care of ours while in running by less conscious. If we done all the vehicles with automated security system that provides high security to driver, also gives alarm. Function: This project involves measure and controls the eye blink using IR sensor. The IR transmitter is used to transmit the infrared rays in our eye. The IR receiver is used to receive the reflected infrared rays of eye. If the eye is closed means the output of IR receiver is high otherwise the IR receiver output is low. This to know the eye is closing or opening position. This output is give to logic circuit to indicate the alarm. This project involves controlling accident due to unconscious through Eye blink. Here one eye blink sensor is fixed in vehicle where if anybody looses conscious and indicate through alarm. CONTENTS 1. Introduction ……....……………….………………………………..……6 2. System Model…….……………………………………………….…….7 2.1 Basic Model of The System …….…..……………………..…….7 2.2 Circuit Diagram …….……………………………………..……...8 2.3 Parts of The System …………………………...………..………..9 2.3.1 IR Sensing Circuit………..…….………..……………….9 2.3.2 Alarm Circuit……..………………………………………11 2.3.3...

Words: 3045 - Pages: 13

Performance of the Criminology Graduates in the Board Examination: in Relation to Enhancement Program

...investigation; fire technology and arson investigation. Secondly, Crime Sociology and Ethics as one of the professional subjects of BS Criminology focuses on the concepts of crime and criminology, theories of crime causation, crime topologies, the criminal justice system, juvenile delinquency and the juvenile justice system, human behavior and crises management, police ethics and community relations, and current police issues. Third was Correctional Administration that focuses on the history punishment from past to present, their theories and philosophies, the management and operation of all institution and community based correctional system, diagnosis, classification and handling and treatment of offenders and their rehabilitation programs and activities and how the principles of correction was applied to the Bureau of Correction, PNP, PPA, BPP and DSWD and other Correctional agencies manual. Fourth is Law Enforcement and Administration comprising six (6) areas that deal primarily on the actual police works, management of the organization, recruitment, promotion and attrition system in the PNP, police planning, the scope of police patrol, police intelligence , security system and the management of police personnel. Criminalistics as the fifth area in the professional subjects has the scope of the scientific study of the detection of forgery, deception methods and techniques in the classification of fingerprint, ballistics examination, the application of chemistry in......

Words: 9482 - Pages: 38

Creating a Social Program

...Creating Social Program HSM240 Week Nine 10/14/2012 | Introduction Human services is more than just helping people, it is a network of values, structure, leadership, and planning. Beyond is an organization that will provide support services to adults with disabilities. This organization will establish itself as a leading resource to better help aid disabled Americans. In order to complete exception services, the for-profit organization will build on its profits to establish new and creative opportunities in rehabilitation, employment, and job trainings. The organization will establish a foundation by developing a mission, value statement, and purpose. A team of ethical leaders will establish a mission statement, code of ethics, and leadership in the community. Description The target population Beyond will provide services for are adults with disabilities. The minimum age to be a client with the organization is 21 years of age. In addition, clients must provide a professional medical documentation stating their disabilities in order to become a client of the organization. Client’s disabilities will range from individuals that utilize wheelchairs to adults with personality disorders. Employees will be certified and trained to supervise adults with disabilities in employment opportunities and rehabilitation services. Rehabilitation services will act as a foundation to develop the skills necessary to function in the community and employment. Employment will be......

Words: 2479 - Pages: 10

Led 8x8x8

...Photo Ride Science Tech LED Cube 8x8x8 by chr on November 16, 2010 Table of Contents LED Cube 8x8x8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro: LED Cube 8x8x8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 1: Skills required . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 2: Component list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 3: Ordering components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 4: What is a LED cube . . . . . . . .......

Words: 21520 - Pages: 87

Blink - the Power of Thinking Without Thinking

...of 1986, it went on display for the first time. The New York Times marked the occasion with a front-page story. A few months later, the Getty’s curator of antiquities, Marion True, wrote a long, glowing account of the museum’s acquisition for the art journal The Burlington Magazine. “Now standing erect without external support, his closed hands fixed firmly to his thighs, the kouros expresses the confident vitality that is characteristic of the best of his brothers.” True concluded triumphantly, “God or man, he embodies all the radiant energy of the adolescence of western art.” The kouros, however, had a problem. It didn’t look right. The first to point this out was an Italian art historian named Federico Zeri, who served on the Getty’s board of trustees. When Zeri was taken down to the museum’s restoration studio to see the kouros in December of 1983, he found himself staring at the sculpture’s fingernails. In a way he couldn’t immediately articulate, they seemed wrong to him. Evelyn Harrison was next. She was one of the world’s foremost experts on Greek sculpture, and she was in Los Angeles visiting the Getty just before the museum finalized the deal with Becchina. “Arthur Houghton, who was then the curator, took us down to see it,” Harrison remembers. “He just swished a cloth off the top of it and said, ‘Well, it isn’t ours yet, but it will be in a couple of weeks.’ And I said, ‘I’m sorry to hear that.’” What did Harrison see? She didn’t know. In that very first moment,......

Words: 74585 - Pages: 299

Creating a Social Program

...Creating a Social Program Shanequa Young HSM 240 March 30, 2014 Lori Moon Creating a Social Program Department of Education The Shanequa L. Young Foundation is respectfully requesting a grant in the amount of $125,000, for our Youth Empowerment Program. As one of the largest teen outreach programs, we are aware of the changing demographics in our service area. We are committed to ensure our project meets the needs of the addressed purpose. Our intentions are to (1) provide comprehensive access to social services for teens in low income communities to decrease the dropout rate, and (2) educate our staff, board and volunteers of the Youth Empowerment Program of our mission, goals and objectives and cultural competency. Our Board of Directors is eager to launch this project, in an effort to be the most successful and culturally competent program for teens within the demographic area. With our commitment to the program, we would like to integrate some of the profits into the annual operating budget. This will ensure after success, to continue the program for another year. Thank you for your consideration, and schedule a follow up with any questions or concerns you may have. I will be honored to meet and discuss the merits of our proposal. Please feel free to contact Douglas D. Griffin, our Director of Development, at (972)-480-2125 or griffin_doug@yahoo.com Sincerely...

Words: 1923 - Pages: 8

“Measuring the Effectiveness of Grameenphone’s Csr Programs in Creating the Brand Awareness”

...Dhaka City College INTERNSHIP REPORT ON “Measuring the Effectiveness of Grameen Phone’s CSR Programs in Creating the Brand Awareness” Supervised By: Ms.Nasrin Sultana Lecturer Department of Business Administration Submitted By: Sarower Jahan ID # 170 Major Area: Marketing Date of Submission: Some of the key CR initiatives: Health: Helping and caring for the community is an essential component of Grameen phone's Corporate Social Responsibility; therefore we endeavor to make a positive contribution to the underprivileged community of Bangladesh by helping in improvement of the health perils in the country as much as possible. Healthcare is still inaccessible for many Bangladeshis. Almost half of the country's population live below the poverty line and cannot even afford basic healthcare. Only 35% of the rural population use adequate sanitation facilities and 72% have access to clean drinking water. Moreover the......

Words: 4337 - Pages: 18

Creating a Social Program

...Creating a Social Program By: Allyson Griffith Course: Hum/240 Instructor: Gabriela Simeonova Due Date: 8/10/2014 The proposal submitted will be to fund an agency that will help families struggling with addictions by a family member. The focus of the agency will be to help those with substance abuse within these families. Substance abuse is a social problem that not only affects the family members, but also affects the community because of employment, legal, and health problems that are a direct result of the alcohol or drug abuse. This ongoing social problem has no timeline for an end to the problem forever, but to diminish as many risks as possible. The causes and consequences as a result of substance abuse has many theories of why it happens to certain individuals, and what the most serious consequences are that affect the family of the substance abuser. This social problem of substance abuse does not have any one economic status, or race. Whenever an individual’s values are to the point that there is so much restriction, there may be a time when the worker is no longer looking at what is the benefit to the recipient but rather to how “things ought to be.” According to Chambers and Wedel (2005), “Sometimes it is difficult to disentangle value and knowledge statements. Ideology is built from value statements, and explanations and causal chains are built from sentences that describe what the case about one thing or another is.” As in, any agency or organization there......

Words: 1151 - Pages: 5

Creating a Program

...While working in my most recent job, I was in charge of a backroom for a large retail company, and quickly realized that I could solve many issues with just a few simple programs. While I know in the spectrum of business, software or hardware changes are anything but simple, though the idea itself was relatively easy. I quickly realized that while during our inventory process that we would do most mornings, that while there was a system for the corporation to keep track of where and what was being shipped, we as the store did not have much of a hint as to what we were getting or for that matter how much of certain products we had at all. Being an intermediate programmer, I generally think in terms of programs and how I could make things better and easier, not only for myself but for everyone else on my team. The first thing for me is to get a view of the big picture of things, falling in line with the first step of the programming development cycle, Analyze. This gives me a chance to make sure that the ideas that I am coming up with are not just one of those far fetched, well if we had a stick, a match and a kangaroo type of ideas, but actually legitimate ideas that could improve our work flow. It gives me a good idea of what information you would need on both ends, being your inputs and outputs. The next step is designing my personal favorite. This is where you are fixing the problem with an algorithm, or a logical sequence of steps to solve a particular problem. I am very......

Words: 855 - Pages: 4

Blink

..."In the first two seconds of looking –in a single glance – they were able to understand more about the essence of the statue than the team at the Getty was able to understand after fourteen months . . . Blink is a book about those first two seconds." Gladwell begins his introduction with the story of a kouros – an ancient Greek sculpture of a young naked male – that was acquired by the J. Paul Getty Museum in 1983. Kouroi are very rare. As a result this particular kouros was being sold for $10 million. Because of the hefty price tag, the Getty Museum was very careful when testing to see if the kouros was a forgery. However, after 14 months of analysis, the Getty determined that the kouros was in fact real, and bought the statue. Many scholars did not agree that the kouros was real. To them, something about the statue didn’t look right. When Thomas Hoving, the former director of the Metropolitan Museum of Art in New York, looked at the statue the first word that came to his mind was “fresh”. When Angelos Delivorrias, director of the Benaki Museum in Athens, first laid eyes upon the statue he felt a wave of immediate disgust. For a long time the validity of the kouros was hotly debated. Finally, the Getty’s case began to fall apart. As it turned out, a lot of the documents used to prove the statue’s authenticity were forged. Also, as experts began to examine the statue in great detail, they came to the realization that it used a hodgepodge of styles from many different......

Words: 6053 - Pages: 25

Blink

...James Sinegal draws upon most during his year-round visits to local Costco ... 3. Howdoes Costco's high worker-retention rate help the warehouse dub maintain low prices? ... Explain how Costco's select test-market ware-houses demonstrate ... [PDF]chapter - Kentucky Community & Technical College System http://elearning.kctcs.edu/bbcswebdav/xid-394132_4 * Which of the three management-skill categories do you think Costco CEO James Sinegal draws upon most during his year-round visits to local Costco. [PDF]HERMES Winter 2007 - Columbia Business School http://www8.gsb.columbia.edu/.../hermes-win... * Columbia Business School BANC: The Alumni Web Site Visit ... In this issue of HERMES, you will find a featureon the Program on Social ... his recent study on long-term regret, looking at an issue that we all can relate ... N E W S M A K E R S www.gsb.columbia.edu. 3. HE RME S • W I N T E R 2 0 0 7. 3 ..... 2006 Botwinick Prize for Costco's Sinegal. [PDF]Here - Bruno Dyck Research and Writing brunodyck.weebly.com/uploads/1/4/7/1/.../ch_1_dyck.neubert.2010.pdf * * May 9, 2008 - erence point when you are navigating in the chapter ... Jack Welch, the former chief executive officer (CEO) of ... leadership, GE experienced 22 consecutiveyears of divi- ... Most people have at least some idea of what managers do ...... employee.46 Similarly, Costco's CEO James Sinegal says, “I figured ... | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |......

Words: 698 - Pages: 3

Led Light

...A light-emitting diode (LED) is a two-lead semiconductor light source. It is a p–n junction diode, which emits light when activated.[4]When a suitable voltage is applied to the leads, electrons are able to recombine with electron holes within the device, releasing energy in the form of photons. This effect is called electroluminescence, and the color of the light (corresponding to the energy of the photon) is determined by the energy band gap of the semiconductor. An LED is often small in area (less than 1 mm2) and integrated optical components may be used to shape its radiation pattern.[5] Appearing as practical electronic components in 1962,[6] the earliest LEDs emitted low-intensity infrared light. Infrared LEDs are still frequently used as transmitting elements in remote-control circuits, such as those in remote controls for a wide variety of consumer electronics. The first visible-light LEDs were also of low intensity, and limited to red. Modern LEDs are available across the visible,ultraviolet, and infrared wavelengths, with very high brightness. Early LEDs were often used as indicator lamps for electronic devices, replacing small incandescent bulbs. They were soon packaged into numeric readouts in the form of seven-segment displays, and were commonly seen in digital clocks. Recent developments in LEDs permit them to be used in environmental and task lighting. LEDs have many advantages over incandescent light sources including lower energy consumption, longer......

Words: 5486 - Pages: 22

Creating a Social Program

...Description of organization Jewel’s Rescue mission is a Non-profit, Non-denominational Christian organization meeting the needs of less fortunate in the county of Merced through emergency short and long-term rehabilitation services. The program will also serve as a rescue mission for some displaced pets. Jewel’s Rescue Mission was established because of the love and compassion of one woman. As long as I can remember, Jeweline (Jewel) P. Mays opened her home and heart to people and pets of all lifestyles. Her love for Christ kept her humble and prosperous. She rarely missed a day of cooking a hearty meal. Every meal cooked was large enough to feed a small army. There was seldom a day that a stranger was not at our table. Jewel would always save the scraps for animals. All who knew her knew Jewel throughout the community as,”Mom”. In 2006, Jewel was diagnosed with a rare illness. Physicians informed us the illness would end her life within three years. That news never discouraged her, and her faith in God never waivered. Although her wind capacity was getting shorter as they day went on, she continued going to church until she was no longer able to endure the air outdoors. With all of this going on her life, she kept feeding the hungry and helping those who needed help mentally, spiritually, sometimes physically and financially for the better part of those three years. Towards the end of her life, she was still concerned about a few she had not been able to help in the......

Words: 1218 - Pages: 5

Creating a Social Program

...Creating a Social Program Rosalind Harris HSM/240 August 21, 2010 Kevin Bottomley It is estimated that 1.3 million children are entrusted to their grandparents’ care everyday and that 2.4 million children live in households headed by a grandparent. This practice is one of tradition, especially in the African-American culture. Full-time care giving of grandchildren by grandparents is a growing national phenomenon (Moore & Miller, 2007). During this time, some grandparents experience stress and resentment for having to raise their children’s children. On the other hand, grandchildren experience emotional, behavior and academic problems at school (Edwards, Daire, 2006). This experience can be devastating for both grandparent and grandchild. With the assistance of the social program called “Grandma and Grandpa’s Hands”, Grandparents can learn how to cope with caring for grandchildren and grandchildren can receive assistance to enable them to improve their performance in school and to adjust to living in a loving environment where the grandparents are the guardian. The creation of this new social program will enable grandparents and grandchildren to appreciate this rewarding experience. The Social Problem The problems that this social program addresses is that different circumstances that place children in jeopardy such as the abandonment of child/children by the parent. In most cases, this is the result of a parent’s drug use, mental illness of a parent and......

Words: 1926 - Pages: 8

Blink

...Executive in Dhaka (Bangladesh) – Reviewed 2 weeks ago Pros – Now a days, people wants to work in a telecommunication company to show their output perfectly. So that i joined in banglalink as it is a multinational company; its mother company is Vimpelcom & was Orascom Telecom Holdings. Cons – banglalink is not maintaining the hundred percent multinational enveronment as now a days it is very expencive to maintain the same & also cost minimization is going on at all the wings to reduce the operational cost. Advice to Senior Management – Need 360 degree review regarding line managers' apprisal. “good working,self confidence and honestly working.” Current Ccr in Comilla, Barisal (Bangladesh) – Reviewed 3 weeks ago Pros – day out program my company from bandorbon . Cons – working long time fixed very boring. Advice to Senior Management – satisfied employer's working . “Excelent” Current Logistics Senior Executive in Chittagong, Chittagong (Bangladesh) – Reviewed 4 weeks ago Pros – Good Team Work as well as Corporate environment. Cons – Better Judgement needed about promotion policy. Advice to Senior Management – Management can upgrade the frings and benefit of the employee. “So far it is a pleasant journey :-)” Current Anonymous Employee in Dhaka (Bangladesh) – Reviewed 5 weeks ago Pros – Good culture, cooperating colleagues, accommodating senior management, competitive compensation, stable and comparatively secured job, participatory decision......

Words: 881 - Pages: 4