DOC PREVIEW
UNCC ECGR 4101 - Study Notes

This preview shows page 1 out of 2 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

ECGR 4101/5101: Lab 4 Fall 2006 1 ECGR 4101/5101, Fall 2006: Lab 4 Using the onboard ADC of the SKP Learning Objectives This lab will introduce you to using the Analog to Digital Converter on our Renesas board, and new C programming concepts like table lookup. General Information The general steps for this lab are: 1. Generate a new project. Name your new project Lab4. 2. Modify the main.c file and include the appropriate files. Include commenting along the way. 3. Program the lab. Don’t forget the necessary include files to get the correct functionality. 4. Compile the code into an .x30 file, and load onto the board. 5. Test the program and repeat sets 4 and 5 until the program works as required. 6. Write your lab report. 7. Demonstrate for a TA and turn in your report. Prelab Activity You may use the PCs in SciTech 203 or your own PC to do this lab experiment. The machines in SciTech 203 already have the software tools loaded. Inspect the files created for your project. 1) Which file includes macros to make using the ADC more user friendly? 2) What are these macros? 3) What file includes the LCD setup functions? 4) What function allows you to display a string to the LCD? Laboratory Assignments In this lab you will be generating a main.c file from scratch. At power-up the LCD should display the temperature of the thermister, in Fahrenheit. Print the temperature by converting the raw number to a temperature in Fahrenheit and displaying it with the format xxx.x. You must use a table lookup. Therefore, you must build the table based on the thermister formula. Steps 1. Follow the steps given in lab 2 for generating a new project. 2. Create the main.c file and include the appropriate files. 3. Build your program slowly, testing along the way. Perform compiles and solve each requirement one at a time.ECGR 4101/5101: Lab 4 Fall 2006 2 4. Continue to build and test the program until all of the requirements have been met. 5. If you run into problems, use the break point functionality of KD30 to step through the code until you find the problem. 6. Once all the requirements have been met, ensure that everything works. 7. Finish lab write-up and demonstrate for a TA. Requirements Req. 1 – The code generated is written in C for the SKP16C62P. Req. 2 – The code is well commented and easy to follow Req. 3 – The current temperature reading should be displayed on the first line of the LCD in degrees Fahrenheit, in the format xxx.x. Req. 4 – The program must use a table lookup. Req. 5 – The temperature must be accurate to within 2 degrees F. Req. 6 – You may not use floating point operations in the regular running code. Lab Report Turn in a hard copy of the code you wrote and a printout of the map file. Also include in your lab report observations and procedure like the following: The general learning objectives of this lab were . . . The general steps needed to complete this lab were . . . Some detailed steps to complete this lab were . . . . 1. Step one 2. Step two 3. . . . . Code generated for this lab… Some important observations while completing/testing this lab were . . . In this lab we learned . . .


View Full Document

UNCC ECGR 4101 - Study Notes

Documents in this Course
Load more
Download Study Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Study Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Study Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?