ELE22MIC - Microprocessors
Total Page:16
File Type:pdf, Size:1020Kb
ELE22MIC - Microprocessors. Lecturer: Paul Main. Email: [email protected] Room: BG 441 Tel: 9018 6732 Laboratory Coordinator: Geoff Tobin. Room: Physical Sciences 2, Room 114 Email: [email protected] Tel: 9479 3736 Course Outline: Aims: Develop a working knowledge of digital logic and how those principles can be applied to implement a microprocessor system. Learn how to design, build, program and debug a useful basic microcomputer system. Familiarise students to basic architecture of modern microprocessors, micro-controllers and common peripherals. Learn interfacing techniques for simple transducers (via the Analog to Digital Converter) and how to apply them to implement electronic systems. Develop an ability to write ATMEGA128L (assembly language and C) code to meet a design goal. Handbook Course Description This is a first course in microprocessors and their applications. Topics include introduction to microprocessors, microprocessor architecture, microcomputers, assembly language programming, memory, parallel and serial I/O, computer design, timing, address decoding, interrupts, memory management, caches, virtual memory, mass storage devices, DMA, systems programming and other processors. 1 Class Requirements: Two lectures per week (total of 26) One problem class per fortnight (total of 6 problem classes) Three hours practical work per fortnight (total of 6 sessions). Three assignments. Lectures: 26 One-Hour Lectures. Tuesday 9:00am HS1 136 Friday 9:00am PW 101 Laboratory Sessions: One 3-Hour Laboratory Session per fortnight. - Total of 6 Labs commence next week. Duration: 3Hours WEDNESDAY: 2:00 pm THURSDAY: 2:00 pm Location: Beth Gleeson, Room 310 Problem Classes: - Total of 6 TUESDAY: 12noon, Duration: 1 Hours WEDNESDAY: 12noon, Duration: 1 Hours Location: HS1, ROOM 302 Consultation Times: - weekly during semester 2 Tuesday 10:00am - 12 noon PS2 Room 118 Friday 10:00am - 12 Noon PS2 Room 118 2 Lecture Topics Include Introduction to microprocessors -History & perspective Digital Logic Review Hexadecimal & Binary Arithmetic Review The CPU : What's inside ? CPU operation: Instruction Pointer, Fetch-Execute cycle, jump Microcomputers, Microprocessor architecture, The Arithmetic and Logic Unit - ALU Arithmetic & Logical Instructions : Add, Subtract, Shift Left/Right Multiply & Divide Assembly language programming ATMEGA128 Instruction set : Registers, Load, store, transfer, exchange, Addressing Modes The Condition Codes Register, Jumping, Conditional Branching, Programming techniques and applications Flow charts Interrupts & interrupt handlers Memory, Computer design - Timing diagrams & meeting timing constraints Address decoding, Interrupts, Computer memories (hardware aspect) Computer memories (system application) Memory management, Virtual memory, Mass storage devices, Input/Output: Parallel and serial I/O, Grey codes Serial Input/Output serial interface devices UARTS, RS232, RS485 Simple computer networks Designing a ATMEGA128 based computer: memory address space considerations bus timing considerations Expanded memory design & caches The counter/timer subsystem on ATMEGA128 The A to D converter subsystem on ATMEGA128 Mass storage devices Advanced Aspects Caches, Direct memory access (DMA) and related issues, DMA, Features of other micro-controllers RISC vs CISC 3 Assessment: 2-hour Examination (70%), Laboratory work (20%) Assignments (10%). Microprocessors Resources: Textbooks Embedded C Programming and the Atmel AVR Barnett, Cox and O’Cull ISBN 1-4018-1206-6 $96 Designing Embedded Hardware - John Catsoulis ISBN 0-595-00362-5 $51 Web site URLs: Course Notes: http://www.sea.vg/mic http://www.atmel.com/products/avr/overview.asp ELE22MIC Resource CDROM To be handed out in lecture 3. Containing notes & device datasheets. 4 Laboratory sessions cover: Familiarisation with ATMEGA128 hardware Find out about the Bootloader monitor program, Use AVR Studio commands to view the contents of memory and processor registers. Examine the directly addressable memory space of ATMEGA128 microprocessor and find out how it is partitioned, Explore various instructions and addressing modes of the ATMEGA128. “Hello World” program. Study the ATMEGA128's - addressing modes, - registers, - Reset vector and interrupt vectors. This lab involves designing and writing an application program in assembler. The aim of the program is to non-destructively test an area of memory for corruption. The problem is to be broken up into smaller parts which are much easier to manage... The Stepper Motor Control Lab. The timer counter subsystem. System software development - The analog to digital (AD) converter. Applications of the AD Converter Decoding Gray codes. Designing, building and prototyping a useful microprocessor system. 5 HISTORIC PERSPECTIVE - TIMELINE OF COMPUTING The Abacus “Computing Tray” The first mechanical calculating machine. 28? The Computing Tray - was used by Babylonian priests to keep track of their vast storehouses of grain. Still in use today. Circa 3000BC. In Roman times the board was given grooves to facilitate moving the counters in the proper files. Circa 1300BC Wire & Bead Abacus replaced the Chinese calculating rods. A modern equivalent is an Accumulator it is used to accumulate intermediate results of arithmetic calculations. Modern accumulator uses binary numbers. 6 Analog Calculators: In 1612 John Napier uses the printed decimal point, devised logarithms and used numbered sticks (or Napiers Bones) for calculating. This principle lead to the invention of the slide rule. Mechanical Calculators In 1642: Blaise Pascal Invented the first mechanical calculator constructed of 10-toothed gears, wheels & teeth. It was called “Pascalene”. The same principle is still in use in automobile’s (mechanical) odometer mechanism. The same principle was the basis for all mechanical calculators. Punched Cards In 1801 Joseph Marie Jacquard invented a machine to use a linked sequence of punched cards programmed to control a weaving machine and produce intricate weaving patterns in cloth. 7 1823: The royal Astronomical Society of Great Britain commissioned Charles Babbage to produce a programmable calculating machine. He was aided by Augusta Ada Byron, the countess of Lovelace - the first programmer. The machine was to produce navigational tables for the Royal Navy. 1834 Babbage shifted his focus to work on The Analytical Engine. The mechanical computer stored 1000 20-digit decimal numbers and a variable program that could modify the function of the machine to perform various tasks. Input to his engine was through punched cards. It is assumed that he obtained the idea from Frenchman, Joseph Jaquard. After many years of work, Babage’s dream faded when he realised that the machinists of the day were unable to create the parts needed to complete his work. The analytical engine required 50 000 precision machined parts to allow his engine to function reliably. Michael Faraday Was the son of a blacksmith. He had limited formal education but attended public lectures and became an avid reader. In 1813 Started working life at the London Royal Institution as a laboratory assistant. In 1821 demonstrated the electric motor effect. In 1831 demonstrated EMF(current) induced by motion of magnet by a nearby conductor. Electric Motors became available. Motor driven adding machines based on mechanical calculators developed by Blaise Pascal became popular. Electrically driven mechanical calculators were common office equipment until 1970s. Telecommunication by Morse Code 1844 - Samuel Morse sent a telegraph from Washington to Baltimore. 8 George Boole Publishes “Laws of Thought”, describing a system for symbolic & logical reasoning which becomes the basis for computer design. 1858 A telegraph cable spans the Atlantic Ocean & provides service for a few days. Alexander Graham Bell in 1876, invents and patents the telephone. Herman Hollerith’s Tabulator In 1889, Herman Hollerith developed punched cards for storing data. Like babbage he also borrowed the idea of a punched card from Joseph Jaquard. Hollerith developed a machine that counted, sorted and collated information stored on punched cards. He founded the Tabulating Machine Company. After a number of mergers, the Tabulating Machine Company was formed into the International Business Machines Corporation - IBM. The punched cards used in computer systems are often called Hollerith cards. The 12-Bit code used on a punched card is called the Hollerith Code. Mechanical machines continued to dominate the Information Processing world until 1941. Guglielmo Marconi In 1895, transmitted the first radio signal. Claude Shannon in 1937 publishes the principles for an electric adder using base two. Conrad Zuse German Inventor, created the first electro-mechanical calculating computer in 1941. It was used for aircraft & missile design during World War II for the German war effort. The Z3 used a 5.33Hertz clocking frequency and was based on electro-mechanical relays. 9 World War II (WWII) commenced. Great Britain’s survival depended on imports of fuel, food, weapons & industrial raw materials. Germany’s Gossadmiral Doenitz’s planned to sink the merchant ships that were bringing supplies to Brittain by using a powerful submarine fleet. Doenitz calculated that sinking 800 000 tons of merchant ships per month would bring Britain to starvation, surrender and a request for peace would result. Enigma: 1941 German Commands to the submarine fleet were initially encrypted with a three rotor Enigma before being transmitted by radio