*********// // MSP432P401 Demo - SysTick used in interval mode // Description: SysTick is configured to...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
*********// // MSP432P401 Demo - SysTick used in interval mode // Description: SysTick is configured to count down from 0x20000 to 0. At 0, the SysTick count gets reloaded to the original 0x20000 value to repeat the // process. An interrupt is also configured to trigger when the SysTick count // gets down to 0. P1.0 LED is toggled in the SysTick interrupt service routine. MSP432P401x ZIN || --|RST // // //** #include "msp.h" William Goh Texas Instruments Inc. Oct 2016 (updated) | November 2013 (created) Built with CCSv6.1, IAR, Keil, GCC int main(void) { WDT_A->CTL = WDT_A_CTL_PW | WDT_A_CTL_HOLD; // Stop WDT } // Configure GPIO P1->DIR | BITO; P1->OUT &= ~BITO; P1.0|-->LED // Enable SysTick Module SysTick->CTRL |= SysTick_CTRL_CLKSOURCE_Msk | SysTick_CTRL_ENABLE_Msk; // Set SysTick period = 0x20000 SysTick-> LOAD = 0x20000 - 1; // Clear the SysTick current value register by writing a dummy value SysTick->VAL=0x01; // Enable SysTick interrupt SysTick->CTRL |= SysTick_CTRL_TICKINT_Msk; // Enable global interrupt _enable_irq(); ************ while (1) __sleep(); } // End of main SCB->SCR |= SCB SCR_SLEEPONEXIT_Msk; // Enable sleep on exit from ISR // Ensures SLEEPONEXIT takes effect immediately _DSB (); // Interrupt service routine invoked when SysTick down counter changes 0. void SysTick_Handler (void) { P1->OUT ^= BIT0; // Toggle P1.0 LED System Design 1. Use CCS to create an empty main C project for the MSP432 Launchpad. 2. Enter and execute the SysTick demo code above. 3. Use an oscilloscope to show the generated P1.0 output signal. Draw the output signal in your lab notebook annotating it with the values and units of its high voltage, low voltage, and cycle length. 4. Time your heart pulse on your wrist. 5. Modify the code to produce a visual output signal with your heart pulse frequency. What was your modification? Write your calculations and plot the output signal in your lab notes. Sync up your design with your heart. 6. Modify your design to include a button to increase the output frequency by 10% and a button to decrease the output frequency by 5%. Set the system default frequency to your heart pulse rate at rest. Then stand up and use the buttons to finely adjust output frequency to match your standing heart pulse. Set the minimum rate to 45 beats per minute and the maximum to 115. Upon reaching either the maximum or the minimum pulse rate, a visual indicator must show that the corresponding limit has been reached. 7. Draw a circuit schematic diagram and a flow chart of your final design. 8. Once you are done, show your lab notes and demonstrate system functions to the Teaching Assistant for lab credit. *********// // MSP432P401 Demo - SysTick used in interval mode // Description: SysTick is configured to count down from 0x20000 to 0. At 0, the SysTick count gets reloaded to the original 0x20000 value to repeat the // process. An interrupt is also configured to trigger when the SysTick count // gets down to 0. P1.0 LED is toggled in the SysTick interrupt service routine. MSP432P401x ZIN || --|RST // // //** #include "msp.h" William Goh Texas Instruments Inc. Oct 2016 (updated) | November 2013 (created) Built with CCSv6.1, IAR, Keil, GCC int main(void) { WDT_A->CTL = WDT_A_CTL_PW | WDT_A_CTL_HOLD; // Stop WDT } // Configure GPIO P1->DIR | BITO; P1->OUT &= ~BITO; P1.0|-->LED // Enable SysTick Module SysTick->CTRL |= SysTick_CTRL_CLKSOURCE_Msk | SysTick_CTRL_ENABLE_Msk; // Set SysTick period = 0x20000 SysTick-> LOAD = 0x20000 - 1; // Clear the SysTick current value register by writing a dummy value SysTick->VAL=0x01; // Enable SysTick interrupt SysTick->CTRL |= SysTick_CTRL_TICKINT_Msk; // Enable global interrupt _enable_irq(); ************ while (1) __sleep(); } // End of main SCB->SCR |= SCB SCR_SLEEPONEXIT_Msk; // Enable sleep on exit from ISR // Ensures SLEEPONEXIT takes effect immediately _DSB (); // Interrupt service routine invoked when SysTick down counter changes 0. void SysTick_Handler (void) { P1->OUT ^= BIT0; // Toggle P1.0 LED System Design 1. Use CCS to create an empty main C project for the MSP432 Launchpad. 2. Enter and execute the SysTick demo code above. 3. Use an oscilloscope to show the generated P1.0 output signal. Draw the output signal in your lab notebook annotating it with the values and units of its high voltage, low voltage, and cycle length. 4. Time your heart pulse on your wrist. 5. Modify the code to produce a visual output signal with your heart pulse frequency. What was your modification? Write your calculations and plot the output signal in your lab notes. Sync up your design with your heart. 6. Modify your design to include a button to increase the output frequency by 10% and a button to decrease the output frequency by 5%. Set the system default frequency to your heart pulse rate at rest. Then stand up and use the buttons to finely adjust output frequency to match your standing heart pulse. Set the minimum rate to 45 beats per minute and the maximum to 115. Upon reaching either the maximum or the minimum pulse rate, a visual indicator must show that the corresponding limit has been reached. 7. Draw a circuit schematic diagram and a flow chart of your final design. 8. Once you are done, show your lab notes and demonstrate system functions to the Teaching Assistant for lab credit.
Expert Answer:
Answer rating: 100% (QA)
The skin friction coefficient Cf for a laminar boundary ... View the full answer
Related Book For
Smith and Roberson Business Law
ISBN: 978-0538473637
15th Edition
Authors: Richard A. Mann, Barry S. Roberts
Posted Date:
Students also viewed these programming questions
-
Goals related to usability and user experience: Consider the usability and user experience goals of Tripadvisor.com .Then, make a list of at least three objectives that you believe are crucial for...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Googles ease of use and superior search results have propelled the search engine to its num- ber one status, ousting the early dominance of competitors such as WebCrawler and Infos- eek. Even later...
-
Explain how community service staff members can monitor the impact of work undertaken and/or services provided in line with the scope of their own work role?
-
In which of the following are quantum uncertainties significant: Measuring simultaneously the speed and location of a baseball; of a spitball; of an electron?
-
A euro-area country that runs very large public deficits or shows a persistently high and rising debt-to-GDP ratio violates the provisions of a 2012 treaty aimed at promoting fiscal stability....
-
Which of the following are perfect squares? 1. 45 2. 144
-
The stockholders' equity accounts of Castle Corporation on January 1, 2015, were as follows. Preferred Stock (8%, $50 par, cumulative, 10,000 shares authorized) ....$ 400,000 Common Stock ($1 stated...
-
8. Problem 7.13 (Price And Yield) eBook Problem Walk-Through A 7% semiannual coupon bond matures in 4 years. The bond has a face value of $1,000 and a current yield of 7.4943%. What are the bond's...
-
Calculate the enthalpy and entropy of saturated isobutane vapor at 360 K from the following information: 1. Table 6.1 gives compressibility-factor data (values of Z) for isobutane vapor. 2. The vapor...
-
ASSIGNMENT DETAILS "A brand is a story always being told" -Scott Bedbury (Nike and Starbucks executive), quoted in "11 Simple Steps for a Successful Brand Building Process." LinkedIn is a powerful...
-
1. Wilson Company prepared the following preliminary... 1. Wilson Company prepared the following preliminary budget assuming no advertising expenditures: Selling price $10 per unit Unit sales 100,000...
-
Harms Inc. reported in its 2006 annual report the following information: Plan Status: December 31, 2006 Accumulated Benefit Obligation (ABO) $ 90 Million Projected Benefit Obligation (PBO) $ 95...
-
"Think about the restaurant industry and your personal dining habits. Compare your eating-out habits with those of your parents and grandparents. What changes do you see among the 3 generations in...
-
What is the order-of-growth of the algorithm below? public static int count (int[] a) { wwwwwwww wwwwww int n = a.length; wwwwwwww wowwwww wwwwww // assume sort happens in ~n*lg n Arrays sort (a);...
-
In preparing a budget for the first three months of the current year, Wonka Bar is planning the units of merchandise it must order each month. The company\'s policy is to have 2 5 % of the next...
-
The owners' equity accounts for Vulcano International are shown here: Common stock ($.50 par value) Capital surplus Retained earnings Total owners' equity $ 20,000 210,000 587,300 $ 817,300 a-1.If...
-
1) Predict the organicproduct formed when BzCl reacts with cyclohexanol. BzCl = benzoylchloride. 2) Provide the majororganic product of the reaction below. 3) Draw the structureof the product formed...
-
On April 30, 2010, Barack and George entered into a bet on the outcome of the 2010 Kentucky Derby. On January 28, 2011, Barack, who bet on the winner, approached George, seeking to collect the $3,000...
-
James and Suzanne engaged in the grocery business as partners. In one year they earned considerable money, and at the end of the year they invested a part of the profits in oil land, taking title to...
-
What types of indorsements are the following? (a) Pay to Monsein without recourse. (b) Pay to Allinore for collection. (c) I hereby assign all my rights, title, and interest in this note to Fullilove...
-
Graph the following on the number line: 1. 1 2. 4 3. 3
-
Determine which of -6 and 4 is larger using a number line, and express that using both the greater than and the less than notations.
-
Determine which of 27 and 410 is larger, and express that using both the greater than and the less than notations.
Study smarter with the SolutionInn App