Discuss, Definition and Terms. 5pts each
1. Bits and Bytes - A BIT, is a BINARY DIGIT. It can be a zero or a 1.
A binary number composed of eight bits, such as 11001010 is known as a BYTE -
is a unit of digital information in computing and telecommunications. It is an ordered collection of bits, in which each bit denotes the binary value of 1 or 0..
2. Microprocessor System Diagram -
The CPU can put a binary number on the address bus, to select an individual register in the ROM or ram or the I/O.
The arrows on this bus show that addresses go one way only.
Data at the selected address can be put on the data bus.
The CPU can also put data on this bus which can be written into a register of ram or i/o.
It is not possible to write data into ROM (read only memory).
This is shown by the single arrow on the ROM data bus and double arrows on the other two.
The control bus instructs the chips to do various things, such as when to read or write etc.
The clock tells all the chips when to change what they are doing.
Like the drill sergeant who shouts "LEFT, RIGHT, LEFT, RIGHT".
The crystal control the speed of operation.
In simple systems the crystal frequency is 1,000,000 Hz.
3. ALU - a digital circuit that performs arithmetic and logical operations. The ALU is a fundamental building block of the central processing unit (CPU) of a computer, and even the simplest microprocessors contain one for purposes such as maintaining timers.
4. ROM - a type of storage media which is used in computers and other electronic devices. This tells the computer how to load the operating system. ROM chips can be read from, but not written to. They are non volatile, which means that they retain their contents after power is removed.
5. Instructions and Programs - Instructions are represented by binary numbers called operational codes, or OPCODES. They are frequently written in hexadecimal. Different CPU's have different instructions. To make them easier to remember they are given names called mnemonics.
6.Flow Chart Symbols - When planning software, one of the stages is to produce a flow chart. mThe shape of the box indicates its function.
7. Interrupts - The CPU completes it current instruction.
It then pushes any data it wishes to save onto the stack.
8. System Flags - The 6502 CPU contains a status register and each individual bit is a FLAG. A flag indicates the result of the previous operation.
N result is negative
V result too big, causing an overflow
B set by software BRK command
D in decimal mode
I an interrupt has occurred
Z result zero
C carry
The flags are tested by the CPU and, depending on their state, determine which part of the program the CPU will jump to.
9. Buses - A bus is a collection of wires.
10. System Clock - The clock is a square wave generator whose frequency is controlled by a crystal.
In a typical control system it oscillates at 1MHz (1 million times a second) and controls the speed at which the system operates.
11. 6502 CPU - The 6502 CPU has a 16 bit address bus and an 8 bit data bus. It is powered by a 5 volt supply.Interrupt requests tell the CPU to stop processing its present program and jump to another. The 6502 has eight addressing modes telling the CPU where data is located.
12. RAM - means random access memory, (read/write memory). Ram is VOLATILE, meaning that when you switch off, the data it contains is lost. There are two main types of ram, static and dynamic.
13. Memory Maps - The memory map shows how addresses have been allocated for memory and any other devices connected to the address bus. Each area of memory can be subdivides into pages of 256 addresses.
14. Fetch/Execute - The fetch/execute cycle is the process of fetching an instruction from memory, decoding it and then executing it. The program counter in the CPU contains the address of the next instruction to be fetched. The instruction is represented by a binary number, called an opcode.
15.Addressing Modes and stacks - Addressing modes tell the CPU where to find the data. The 6502 has several addressing modes. The stack is a temporary store for data. The CPU may PUSH important data onto the stack, while it is processing other data. When it finishes that task, it PULLS the saved data off the stack.
TEST II
Essay. 2opts
1. Discuss and illustrate the Basic Microprocessor System/Microcontroller Block Diagram, As we shall see, much of the work performed by the CPU involves reading from and writing to memory. There are three busses involved in accessing memory: the address bus, the data bus and the control bus. The function of each of these busses is illustrated, discuss also the step by step accessing of busses into memory in a one whole sheet of paper.
A control bus is (part of) a computer bus, used by CPUs for communicating with other devices within the computer. The control bus carries commands from the CPU and returns status signals from the devices, While the address bus carries the information on which device the CPU is communicating with. A data bus carries the actual data being processed, for example if the data is being read or written to the device the appropriate line (read or write) will be active (logic zero).
Step by step accessing of busses:
Read Cycle | |
The steps involved in the read cycle are: | |
| |
Write Cycle | |
The steps involved in the write cycle are: | |
|
|