1 / 13

ECT 357

ECT 357. Ch 2 Harvard Architecture. Today’s Quote: Your temper is like a fire. It gets very destructive when it gets out of control. He that hath no rule over his own spirit is like a city that is broken down, and without walls. Proverbs 25:28. Architecture Features.

weldon
Télécharger la présentation

ECT 357

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECT 357 Ch 2 Harvard Architecture

  2. Today’s Quote: Your temper is like a fire. It gets very destructive when it gets out of control. He that hath no rule over his own spirit is like a city that is broken down, and without walls. Proverbs 25:28

  3. Architecture Features • 16 bit Instruction bus • 8 bit Data bus • 12 bit Operand bus • 21 bit Program Address bus (15 useable in PIC18F452) • All separate busses!

  4. CPU Pipelining Washing Machine Example Each time an instruction is executed, the CPU is busy getting (fetching) the next logical instruction from memory. If the next instruction to be executed is not logical, the pipeline is flushed and the next instruction is fetched. Any time the pipeline is flushed, the instruction takes two cycles to execute. 5 of the 77 instructions contain 2 words. These instructions require two fetches before execution and two cycles to execute.

  5. Addressing Methods • Literal Addressing • Direct Addressing • Indirect Addressing

  6. Literal Addressing An instruction that uses literal addressing contains the operand value in the instruction itself. EXAMPLE: movlw k The letter k designates operands which are used in literal addressing. In this case, the instruction “movlw 5” will move 5 into the Working register.

  7. Direct Addressing With Direct addressing, the lower byte of the instruction word contains the address of the operand. The 9th bit of the instruction word selects either the first 128 bytes of RAM or a higher location in RAM specified by the Bank Select Register (BSR).

  8. Direct Addressing Example The instruction “movwf TEMP” will move the contents of the Working register to the RAM address that has the name TEMP. The RAM address is determined by the assembler. The d is this case would be 1 and the a would be 0 if the TEMP is in the lower 128 bytes of RAM. The register address f will be the RAM address of TEMP.

  9. Indirect Addressing With Indirect addressing, special registers known as pointers hold the 12 bit address of the operand variable. This is provided because certain operands such as strings are easier to work with in a loop.

  10. Vectors The PIC18F452 has three special addresses that act as vectors. For example the Address 0x0000 is known as the Reset vector. When power is first applied to the microcontroller or the reset is pressed, the microcontroller will begin executing code at this address. Two other addresses 0x0008 and 0x0018 deal with Interrupts.

  11. CPU Status Bits The CPU STATUS register keeps track of the 8 status bits. The status bits change on a carry, overflow, zero, decimal carry, or negative number.

  12. Special Function Registers There are approximately 80 special function registers that control operation of the CPU, store data, and perform several other functions. Some of the special function registers are two byte registers. All two byte registers are located in memory least significant byte (LSB) first.

More Related