ELEC4601 Microprocessors Lab 2 Tutorial - PowerPoint PPT Presentation

About This Presentation
Title:

ELEC4601 Microprocessors Lab 2 Tutorial

Description:

ELEC4601 Microprocessors Lab 2 Tutorial Signal Waveforms and Parallel port programming Reading Materials From your class notes: Pin-outs and Pin Functions (pages 66 ... – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 15
Provided by: doeCarle
Category:

less

Transcript and Presenter's Notes

Title: ELEC4601 Microprocessors Lab 2 Tutorial


1
ELEC4601 Microprocessors Lab 2 Tutorial
Signal Waveforms and Parallel port programming
2
Reading Materials
  • From your class notes
  • Pin-outs and Pin Functions (pages 66-70)
  • Bus Buffering and Latching (page 72)
  • Bus Timing (pages 75 - 79)
  • From the SDK-86 manual
  • OB (Output Byte) Command (page 3-15)
  • From the Peripherals Handbook
  • 8255A (starting on page 3-100, specifically page
    3-104)
  • From the 8086 Hardware Reference Manual
  • Look up commands OUT, MOV and JMP (For of clock
    cycles, numbers in brackets are for 186)

3
Pre-lab
  • For your Pre-Lab
  • Calculate the number of clock cycles expected in
    the program fragment of part A (page Lab2-4)
  • Find Control Byte value (part B step 1)
  • Write the program (part B step 4)
  • Further study (from Lab Manual)
  • Read Appendix A, logic analyzer operation
  • Read Appendix B, in particular the 8255A and DAC
    extensions

4
Signal Waveforms
  • Part A

5
Objectives
  • Understand bus cycles / timing
  • What do the ALE, WR and RD bits indicate?
  • Can you tell what is the happening during each
    clock cycle by looking at ALE, WR, RD and
    contents of the bus?
  • Instruction pre-fetching, and the effect of JMP
    on the instruction queue

6
Pre-lab
  • Calculate the number of cycles the program
    segment should take to execute (page Lab2-4)
  • Lab2.asm available on the course web

7
Procedure
  • Run the program (lab2.asm)
  • Infinite loop that continuously moves data from
    register to memory
  • Monitor bus signals during program execution
  • Logic Analyzer will show the signals (20 bit
    address/data, WR, RD, ALE, PCLK)
  • Show the Analyzer waveform to a TA to verify
  • Draw the waveforms on the timing diagram in lab
    manual
  • (Show your work. Rest of part A can be done after
    the lab)
  • Interpret what is happening at each clock cycle
    (Table 1)
  • Explain what is happening on the bus during
    program execution (Q. 5-8)

8
Logic analyzer view (incorrect!)
9
Parallel port programming
  • Part B

10
Objectives
  • Understand how to set up 8255A I/O port
  • Understand how to output values to the port
  • Understand how to determine control word to
    configure the port
  • Understand how the D/A converter works
  • Write a program using this information to produce
    a sawtooth waveform
  • You should be able to adjust the period and
    amplitude of your waveform by adjusting your code

11
DA converter concept
  • D/A converter produces converts digital value to
    analogue
  • Each data byte you output to D/A converter will
    produce a certain constant voltage level
  • Your code will have to make the output a
    continuous (?) sawtooth waveform
  • Voltage levels linearly related to data values
    (which range from 00H to FFH)
  • Demonstrate your waveform to TA
  • Ramp from your pre-lab code
  • Modification you made later

12
Part B Pre-Lab
  • Determine the control word needed for part B
  • Write the program for Part B (name it lab2b.asm)
  • Try to optimize your coding
  • Know how you can adjust the amplitude and period
  • Modify program

13
Part B Procedure
  • Program the I/O port for certain output
  • 8255A I/O component is used to interface to CPU
  • Control register is used to configure ports
  • Use OB (output byte) command from keypad to
    output to ports
  • Use OUT command in your program to do the same
  • Use this port to send data values to the D/A
    converter
  • Find data values that produce specified voltage
    levels
  • You will use an oscilloscope to view the D/A
    output
  • Your should be able to calculate certain data
    value needed for certain output voltage

14
  • See you next week!
Write a Comment
User Comments (0)
About PowerShow.com