Fundamental of Robotics Micro Processor PD and Micro
Fundamental of Robotics Micro. Processor (µPD) and Micro. Controller Mr. Krit Kongsrima Program of Computer Science, Computer Education and Information Technology. Faculty of Science and Technology, Rajabhat University Nakhonratchasima.
Structure – Top Level Computer Central Processing Unit Computer Main Memory Systems Interconnection Input Output
What is n n Processor Micro Controller How Different ?
Structure – CPU Level CPU Computer Arithmetic and Logic Unit Registers I/O System Bus Memory CPU Internal CPU Interconnection Control Unit
Structure – Control Level Control Unit CPU Sequencing Login ALU Internal Bus Registers Control Unit Registers and Decoders Control Memory
Computer Component
Structure of von Neumann machine
Synchronous Timing Diagram
Asynchronous Timing – Read Diagram
Asynchronous Timing – Write Diagram
Memory Cell Operation
Typical 16 Mb DRAM (4 M x 4)
Packaging
Generic Model of I/O Module
External Device Block Diagram
I/O Module Diagram
Input Output Techniques n n Programmed Interrupt driven Memory Mapped I/O Direct Memory Access (DMA)
Microcontroller Simulator Version 5
Peripherals
Memory
Binary , Decimal , Hexadecimal Binary Decimal Hexadecimal 0000 0 0 0001 1 1 0010 2 2 0011 3 3 0100 4 4 0101 5 5 0110 6 6 0111 7 7 1000 8 8 1001 9 9 1010 10 A 1011 11 B 1100 12 C 1101 13 D 1110 14 E 1111 15 F
Sample Program of Assembly Lang. ; ===== CONTROL THE TRAFFIC LIGHTS =============== CLO ; Close unwanted windows. Start: MOV AL, 0 OUT 01 MOV AL, FC OUT 01 JMP Start END ; ; ; ; Turn off all the traffic lights. Copy 0000 into the AL register. Send AL to Port One (The traffic lights). Turn on all the traffic lights. Copy 11111100 into the AL register. Send AL to Port One (The traffic lights). Jump back to the start. Program ends. ; ===== Program Ends ===================== YOUR TASK ===== Use the help page on Hexadecimal and ASCII codes. Work out what hexadecimal numbers will activate the correct traffic lights. Modify the program to step the lights through a realistic sequence.
Output of Program
Assembly Language Concept n n n Label Mneumonic Operator Operand RAM Comment
Assembly Language Concept ; ===== CONTROL THE TRAFFIC LIGHTS =============== CLO ; Close unwanted windows. Start: MOV AL, 0 OUT 01 MOV AL, FC OUT 01 JMP Start END ; ; ; ; Turn off all the traffic lights. Copy 0000 into the AL register. Send AL to Port One (The traffic lights). Turn on all the traffic lights. Copy 11111100 into the AL register. Send AL to Port One (The traffic lights). Jump back to the start. Program ends. ; ===== Program Ends ===================== YOUR TASK ===== Use the help page on Hexadecimal and ASCII codes. Work out what hexadecimal numbers will activate the correct traffic lights. Modify the program to step the lights through a realistic sequence.
Assembly Language Concept n n Register AL, BL, CL, DL Instruction Set - Clear - Mov - In/Out - Jump - DB - Increment and Decrement - End
Assembly Language Concept - Clear clo - Mov mov operand 1, operand 2 [operand 1], operand 2 in out operand 1, port_number - In/Out
Assembly Language Concept - Jump jnz jz label - DB db data - Increment and Decrement inc operand dec operand
Microcontroller Simulator Version 5 n n n VDU (Video Displays Unit) Memory #C 0 - #FF Use MOV
Microcontroller Simulator Version 5 n n n Traffic Lights Port #01 Use OUT
Microcontroller Simulator Version 5 n n n Seven Segment Displays Port #02 Use OUT
Microcontroller Simulator Version 5 n n n Heater and Thermostat Port #03 USE IN/OUT
Microcontroller Simulator Version 5 n n n Snake and Maze Port #04 Use OUT
Microcontroller Simulator Version 5 n n n Stepper Motor Port #05 Use OUT
Microcontroller Simulator Version 5 n n n Lift Port #06 Use IN/OUT
Microcontroller Simulator Version 5 n n n Keyboard Port #07 Use IN/Interrupt
Microcontroller Simulator Version 5 n n n Key Pad Port #08 Use IN/Interrrupt
Micro Processor
Micro Processor • • • Z 80 8051 68 HC 00 Pentium 4 Athlon etc.
Micro Processor Intel 4004 First µP - 2300 xtors L=10µm Mos Technology 6502
Micro Processor Pentium® III 28 M transistors / 733 MHz-1 Gz / 13 -26 W L=0. 25µm shrunk to L=0. 18µm Power. PC 7400 (G 4) 6. 5 M transistors / 450 MHz / 8 -10 W L=0. 15µm
Micro Processor Pentium® 4 42 M transistors / 1. 3 -1. 8 GHz / 49 -55 W L=0. 18µm Pentium® 4 “Northwood” 55 M transistors / 2 -2. 5 GHz L=0. 13µm
Micro Processor
Z 80
Z 80
Z 80
Z 80
Z 80
Z 80
8051
8051
- Slides: 56