{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lab 3 - Lab 3 Use of Multiple Functions Xiaojuan Xie 1 The...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Lab 3: Use of Multiple Functions Xiaojuan Xie 1. The system structure is as following: 2. Sequence ReadTemp, LEDPattern, DisplayWaves by long press. Pseudo code of Screens is as follows: IF ISC is set Screen++; ENDIF SWITCH(Screen) 1: call ReadTemp ; Read Temperature every 2 second 2: call LEDPattern; Display LED as a number in decreasing manner 3: call DisplayWaves; Display square wave with given duty cycle END 3. Function ReadTemp implemented as follows: a) Read temperature every 2 second. b) Increase sequence number after each sampling. c) Display temperature in decimal format. d) Display sequence number in decimal format. Function LoopTime generates a delay of 10ms. Initialize SAMPLECOUNT = 200. Only when SAMPLECOUNT decreases to zero, ReadTemp reads temperature sensor, thus we get a sample interval of 2 second. SEQUENCENUM is initialized to 0. Pseudo code of ReadTemp is as follows: SAMPLECOUNT--; IF SAMPLECOUNT == 0 Read Temperature sensor and store it to Value; Screens Mainline Pbutton LoopTime ReadTemp LEDPattern DisplayWaves TempDisplay SeqDisplay DisplayLEDNum DisplaySquareWave ReadPot
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern