Download Report to Introduction to Microprocessors & Embedded Systems Development and more Lecture notes Electronics in PDF only on Docsity!
METU NORTHERN CYPRUS CAMPUS
Introduction to Microprocessors &
Embedded Systems Development
EEE 347/CNG 336 LABORATORIES
Spring 2020
LABORATORY RULES & INSTRUCTIONS
Lab Grading:
- Your lab grade will contribute 20% to your course grade. You should however get a minimum 70/100 from the laboratory to pass EEE- 347 /CNG- 336.
- Each of the Labs 1 - 5 will be done in a team of two, will contribute 1 4 % of your overall lab grade, and 2. 8 % of your overall course grade.
- The final lab (to be held during the finals week) will be done individually, will contribute 30 % of your overall lab grade, and 6 % of your overall course grade. Each student will be provided with an experiment to conduct in the laboratory for the final lab, and answer questions. Partial grades for each lab will tentatively be distributed as follows: Quizzes Reports and preliminary works Laboratory performance Preliminary Work: Students are not permitted to perform an experiment without doing the preliminary work before coming to the laboratory. It is not allowed to do the preliminary work at the laboratory during the experiment. Students who do not have complete preliminary work with them at the beginning of the laboratory session cannot attend the lab. No “make-up” is given in this case. Quizzes: There may be a quiz before each laboratory session, which will start promptly at the beginning of the lab. Students who miss the quiz cannot attend the lab. No “make-up” is given in this case. Students have to be at the lab promptly on time for the quiz. Report: A report about the experiment should be prepared during the experiment and submitted to the assistant before leaving the laboratory. Each group will submit one report including:
- name of the experiment and students
- name of the assistant and date
- the objective of the experiment
- graphical and/or tabular measurements results
- analytical comparison of the results with the expectations in preliminary work
- conclusions The report should be written on A4 white paper in a neat and tidy manner. The graphs should be plotted on commercial A4 graph paper. The report should be submitted immediately after the laboratory session; any late reports will not be accepted. Attendance:
- Students who miss the lab 2 times without an excuse get zero as the laboratory portion of the course grade. Only the following excuses are valid for taking a lab make-up:
- Health Make-up: Having a health report from METU Medical Center.
- Exam Make-up: Having an exam coinciding with the time of the laboratory session. The student needs to notify the instructor in advance if this is the case. Academic Honesty:
- Plagiarism is a form of cheating as is using someone else’s written word with minor changes and no attribution. If you are caught cheating, you will, at the very least, receive a zero for the whole experiment. Disciplinary action may also be taken against you. Other:
- No food or drink in the lab.
out ddrc, r out ddrd, r capture: in r18, pina sts MEMNUM1, r in r19, pinb sts MEMNUM2, r add r18, r brvc no_ovrflw ovrflw: com r no_ovrflw: sts MEMSUM, r out portc, r sts MEMOVF, r out portd, r ldi r16, ZEROS jmp capture b) Use AtmelStudio to create lab1_122_AtmelStudio project. Debug your code, entering input (port) pin values through the I/O window, and making sure that registers, memory locations, overflow status bit, and output (port) pin values are correct. Take a screen capture (PrtScr) of two different results and include in your report, one with inputs at PORTA and PORTB that cause an overflow, and one with inputs that do not cause an overflow. For example, you may organize the relevant state of your machine to show in your screen capture as follows (making sure all your scree captures are readable and properly commented upon): Which lines in the code do not affect the machine state at all? c) Use Proteus to create lab1_122_Proteus project. Instantiate ATMEGA128 microcontroller, and as many DIPSW_8 (8-bit dip switch), LED-BIRG (green led), 4k7 (4.7 kΩ resistor), and RX (pack of 8 resistors) components as you need in order to design the full system described in previous sections, and wire the ports for parallel I/O as in UNI-DS6 development board. Load your debugged code from the previous section to the microcontroller in Proteus, and run the same two cases as in 1.2.2(b) to demonstrate that the LEDs in your system respond correctly to the inputs you provide through the switches. Take two screen captures (PrtScr) to show your system design, and simulated demonstration of correct operation with and without overflow. Instantiate voltage and current “probes” on the microcontroller output port wires in
order to measure voltage and current levels during the simulations. What are the voltage and current levels at the output pins of the microcontroller when the signal corresponds to logic ‘0’ and ‘1’? Measure the voltage drop across an LED when it is ON? What is this drop when LED is OFF? 1.2.3 What is the difference between RAM and ROM? Why is there a need for both a Flash Memory and an EEPROM? 1.2.4 What is the function of the control unit? How does the control unit get the instruction that it must execute? How does it know the number of bytes in an instruction? 1.2.5 Submit your answers to 1.2.2-1.2. 4 at the beginning of the lab as part of the preliminary lab report. Bring your AtmelStudio project directory from 1.2.2(b), including the .asm file, to the laboratory with you in a USB memory stick in order to demonstrate your AtmelStudio simulations to the lab assistant, and answer any questions. Bring your Proteus project directory from 1.2.2(c) to the laboratory with you in a USB memory stick in order to demonstrate your Proteus simulations to the lab assistant, and answer any questions. 1.3 EXPERIMENTAL WORK 1.3.1 Experimental Setup Verify to make sure your workbench has all of the following items:
- A Personal Computer (PC) used as a host terminal
- UNI-DS6 Development Board with a socketed mikroBoard for AVR 64-pin
- UNI-DS6 power adapter
- USB Cable for UNI-DS6 mikroBoard to PC connection
- A CADET used to build external circuits (may use in some of your future labs) 1.3.2 System Startup Please follow the instructions below in order to start the system for your experiments:
- Turn on the PC.
- On the desktop, you’ll see icons for AtmelStudio7, Proteus 8, and AVRFLASH.
- Make sure that the USB cable connects the computer and the UNI-DS6 board.
- Make sure the power adapter is connected to UNI-DS6 power plug (on the upper left side of the board). Your mikroBoard card will be powered by the board, so the “STANDALONE” jumper J1 on the mikroBoard should not be shorted. “VOLTAGE SUPPLY SELECTION” jumper J16 on the upper left should be set for 5 V operation. 1.3.3 In addition to submitting your preminary work, you are required to make 3 demonstrations to the lab instructor, as described below. If asked to run your experiments with new conditions, please comply with the instructions to fully demonstrate your competence of the lab material. i) Open AtmelStudio7, and enter the annotated assembly program from Preliminary Work Section 1.2.2(a) to a text editor, or load it from a flash memory connected to the USB of the terminal. Build and run your code in debug mode (step by step) using the input conditions (vectors) provided by the TA while monitoring the microcontroller state through the windows described in the preliminary work. When you are ready, do your first demo, showing and describing to your TA how the microcontroller state (registers, status bits, memory, ports) get affected by each line in the code.