Lec12 - ECE 212 Digital Circuits II Monday, 10 March 2008...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
1 ECE 212 Digital Circuits II Monday, 10 March 2008 HW Set 12: Problems 1, 2 Rytis U. Problem 3 No presenter. Problem 4 No presenter. Problem 5 Jeff V. Problem 6 No presenter. Problem 7 James W. Problem 8 Nick W. Problem 9 Derek A. Today's Goals To use the 68HC12 to solve a problem. To introduce some 68HC12 instructions. To write a program.
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 General-purpose Registers A8 b i t s B8 b i t s X1 6 b i t s Y1 6 b i t s Special purpose Registers PC 16 bits SP 16 bits CCR 8 bits Memory 16-bit address 8-bit data Review– 68HC12 Architecture Register D = A B The STATE of the processor. Program Counter Stack Pointer Condition Code Register (Flags) Remember the difference! A Problem Input: X[7:0] Signed integer, 8-bit two's complement notation. Solution: Approach 1. Design a combinational circuit. Approach 2. Use the 6812 microcontroller. Processor Input Device Output Device Output: Z[7:0] Signed integer, 8-bit two's complement notation. Operation: do forever{ Z = 2*X + 0x25 } Neglect any overflow.
Background image of page 2
3 Using the 6812 1. Connect the input/output devices. 2. Write a program. Memory PC IR Data Path clock Controller Input/Output PortA PortB PortA is not register A PortB is not register B Output Device Z[7:0] Input Device X[7:0] Ports? Memory PC IR Data Path clock Controller Input/Output Output Device Input Device PortA PortB PortB: 8-bit output port. Address = 0x0001 PortA: 8-bit input port. Address = 0x0000 I/O Memory addresses: All I/O is Memory-Mapped. Addresses are fixed (6812 hardware). Port directions must be configured before using the port. We assume that has been done. X[7:0] Z[7:0]
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 The Program do forever { read PortA; Z = 2*X + 0x25; write Z to PortB; } Read from a memory location (PortA).
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/17/2008 for the course ECE 212 taught by Professor Greco during the Spring '08 term at Lafayette.

Page1 / 12

Lec12 - ECE 212 Digital Circuits II Monday, 10 March 2008...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online