LabReport3

# LabReport3 - Experiment 3 Robert Dumont EEL 4742 LABORATORY...

This preview shows pages 1–4. Sign up to view the full content.

Experiment # 3 Robert Dumont March 22, 2016 EEL 4742 LABORATORY EXPERIMENT # 3 Section: _ 0012 _ Points: _______ Name : _ Robert Dumont _ 1

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

View Full Document
Experiment # 3 Robert Dumont March 22, 2016 Objective: The objective of this experiment is to use C language and assembly language programs to convert ASCII characters to binary and hexadecimal numbers, and also a program to sort input characters. The HyperTerminal program will be used for entering and displaying ASCII data, using the UART on the MSP430FG4618. Apparatus List: A desktop computer system running code composer, the MSP430FG4618 experimenter board, the MSP430 USB-Debug interface (MSP-FET430UIF), LTspice IV (Version 4.23j), HyperTerminal Private Edition (Ver. 7.0), and an ASCII Table. Procedure and/or Design Methodology: In order to convert an ASCII hexadecimal number into a 4 bit binary number, which is necessary in the first step of each the C-language and assembly programs, there are two factors to consider. First, is the ASCII character a number (‘0’-‘9’), or second, is it a letter (‘A’-‘F’). If the ASCII character is a number, 0x30 is subtracted from the character, resulting in hex 0x00 – 0x09, the first four bits are then the binary value of the ASCII number. The value 0x37 is subtracted from the above ASCII letters, resulting in the binary representation of that letter. The same is true for the opposite, converting from the hexadecimal (or binary) value to the ASCII character, except now instead of using subtraction, addition will be used. Converting from an ASCII lowercase letter to uppercase, 0x20 is subtracted. For the opposite, 0x20 is added to the uppercase letter. Design Specification & Test Plan: The designs created meet requirements by producing the required output results to a given input. In order to ensure that requirements are met, the debug section in Code Composer Studio is used to go through code and determine where a program is not performing required results, or where a value is being lost. In order to resolve these issues it is best to pay close attention you commands used and understand the function of them. Commenting the program assists greatly in this by providing an explanation of what each line is expected to do. When instructions perform different results than expected, it is easy to see where the problem is. The last part of each code type requires using a bubble sort method, which is very inefficient, however, is required to meet requirements of this lab. Source Code: 2
Experiment # 3 Robert Dumont March 22, 2016 Below is the source code for each of the programs in experiment #3. All code is commented to explain the process I took in order to achieve the desired program. The first code of each C-language and assembly language include the subroutines Init_UART, INCHAR_UART, and OUTA_UART. In order to save space I have not included OUTA_UART and below in the remaining codes, however is should be include in each of them.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• 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.

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

• 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.

Dana University of Pennsylvania ‘17, Course Hero Intern

• 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.

Jill Tulane University ‘16, Course Hero Intern