LabReport4 - Experiment 4 Robert Dumont EEL 4742 LABORATORY...

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

View Full Document Right Arrow Icon
Experiment # 4 Robert Dumont March 22, 2016 EEL 4742 LABORATORY EXPERIMENT # 4 Section: _ 0012 _ Points: _______ Name : _ Robert Dumont _ 1
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
Experiment # 4 Robert Dumont March 22, 2016 Objective: The objective of this experiment is to use C language and assembly language programs which create an interface to the standard matrix LCD module. The on board LCD display contained on the MSP430FG4618 experimenter board will be used to achieve this task. Apparatus List: A desktop computer system running code composer, the MSP430FG4618 experimenter board, and the MSP430 USB-Debug interface (MSP-FET430UIF). Reference to the Laboratory Manual will also be necessary in order to better understand procedures. Procedure and/or Design Methodology: In order to design steps 4-7 in both assembly and C-language (steps 1-3 are just importing given code), one must first become familiar with how the LCD display is set up. Each seven segment display contains 8 bits, b7 will not be used since it controls the colon or decimal point before the seven segment display. Bits b6-b0, if set to 1, will turn on E,G,F,D,C,B,A, respectively. Starting from the top and making a clockwise loop around corresponds to A-F, and G is the center segment (refer to Laboratory Manual). The first step before writing any code was to make a table of hexadecimal numbers, which will display “0”-“F” on the LCD, to reference to. 0 LCDSeg[]=0x5F; 1 LCDSeg[]=0x06; 2 LCDSeg[]=0x6B; 3 LCDSeg[]=0x2F; 4 LCDSeg[]=0x36; 5 LCDSeg[]=0x3D; 6 LCDSeg[]=0x7D; 7 LCDSeg[]=0x07; 8 LCDSeg[]=0x7F; 9 LCDSeg[]=0x3F; A LCDSeg[]=0x77; b LCDSeg[]=0x7C; C LCDSeg[]=0x59; d LCDSeg[]=0x6E; E LCDSeg[]=0x79; F LCDSeg[]=0x73; In C-language, the first step was to display a 2 on the right most seven segment display, which is LCDSeg[0], by setting that location to the corresponding hex value in the table above, 0x6B. In order to display this in the left most seven segment display, the same process is done, however setting LCDSeg[6] equal to that value, which corresponds to the left most display. In order to display “0”-“F” on the display continuously, first an array of the values in the table above were written in order, to be referenced. Then an infinite for-loop is used to ensure it is 2
Image of page 2
Experiment # 4 Robert Dumont March 22, 2016 continuous and another for-loop inside allows for 15 values to be displayed before exiting and restarting, which displays all values and then restarts. Finally, in order to count up when SW1 is pressed, count down when SW2 is pressed or display the current number when nothing is pressed, a series of if statements inside of an infinite for-loop are used to ensure that when a switch is pressed or un-pressed the action will start or stop. LCDSeg[0], LCDSeg[1] and LCDSeg[2], will be used to display the ones (i), tenths (j), and hundredths (k) value, respectively. A counter is used to check when to increment or decrement the hundredths value and the value of the ones place will determine when the tenths value should be changed. When SW1 is pressed there is a check for if the display value is 999, which will then reset values to 000 and the opposite for SW2. Of course for each of these steps, a delay must be used, otherwise the changes
Image of page 3

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

View Full Document Right Arrow Icon
Image of page 4
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