Laboratory Report Cover Sheet
DeVry University
College of Engineering and Information Sciences

 



 

Course Number: ECET330

 

Professor:

 

Laboratory Number: 7

 

Laboratory Title: Embedded C Programming: Part II

 

Submittal Date: Click here to enter a date.

 

 

 

 

 

Objectives:

 

 

 

  1. To become familiar with enabling internal pull-up resistors and reading an input port

  2. To learn how to wait for a pushbutton press

  3. To learn how to organize a C program to read data from input ports, process the data, and display the result on a simple output device

  4. To learn how to use the ROM program space for data

     

     


    Observations/Measurements:


     


    1. IV. 1- A.  Cut and paste the Memory window, showing the value of mybye before pressing SW1.


    IV. 1-B.  Cut and paste the Memory window, showing the value of mybyte after pressing SW1.


    IV. 1.C - Which LED light turns ON?


    IV. 1.D- What are the LED values when you press SW2?


    IV. 2. A. Cut and paste the source code.


    IV. 2. B. What is the value of PT1AD? Cut and paste the Memory window, showing the value of PT1AD.

    IV. 2. B.What are the LED values when you press SW2? Describe what you observe when you press any of the pushbuttons

     

     

     

    IV. 3. A. Cut and paste the source code.


    IV. 3. B. What are the LED values when you press SW4? Describe what you observe when you press a different switch when the light is ON.

    IV. 4. A. Cut and paste the source code

     

    IV. 4. B.  Cut and paste the Memory window.

    IV. 4. C. Describe how you verify that the data is stored in ROM. Cut and paste the Memory window. 

    IV. 4. D. Describe how you verify that the data is stored in RAM. Cut and paste the Memory window

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Questions:

     

     

     

    1. Describe the code statement:

       while ((PT1AD & 0xF0) != 0xF0);

     

                What does this code do? Do we need the inner parenthesis for the code to work? Why?

     

     

     

    2.When we define an array in the program ROM space, we use a const keyword. What does this keyword do? What does happen if we remove this keyword?

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

 

    • 11 years ago
    This was graded A+ Use Only As A Guide
    NOT RATED

    Purchase the answer to view it

    • week7lab.docx