PIC – ch. 2c. 2.5 PIC Data formats Numbers can be – Hex – Binary – Decimal – ASCII formats.

Slides:



Advertisements
Similar presentations
1 Lecture 3: Instruction Set Architecture ISA types, register usage, memory addressing, endian and alignment, quantitative evaluation.
Advertisements

The 8051 Microcontroller and Embedded Systems
IT253: Computer Organization Lecture 6: Assembly Language and MIPS: Programming Tonga Institute of Higher Education.
Microprocessors General Features To be Examined For Each Chip Jan 24 th, 2002.
By Muhammad Ali Mazidi, Rolin McKinlay, Danny Causey
COMP3221: Microprocessors and Embedded Systems Lecture 2: Instruction Set Architecture (ISA) Lecturer: Hui Wu Session.
Programming and Problem Solving
Railway Foundation Electronic, Electrical and Processor Engineering.
What is an instruction set?
8051 ASSEMBLY LANGUAGE PROGRAMMING
Railway Foundation Electronic, Electrical and Processor Engineering.
ARM Core Architecture. Common ARM Cortex Core In the case of ARM-based microcontrollers a company named ARM Holdings designs the core and licenses it.
AVR Microcontroller and Embedded System Using Assembly and C Mazidi, Naimi, and Naimi © 2011 Pearson Higher Education, Upper Saddle River, NJ All.
ICS312 Set 4 Program Structure. Outline for a SMALL Model Program Note the quiz at the next lecture will be to reproduce this slide.MODEL SMALL.586 ;
Physics 413 Chapter 1 Computer Architecture What is a Digital Computer ? A computer is essentially a fast electronic calculating machine. What is a program.
Dr Masri Ayob TK 2633: Microprocessor & Interfacing Lecture 7: Assembly Language.
Instruction Set Architecture
CoE3DJ4 Digital Systems Design
Directives, Memory, and Stack. Directives Special commands to the assembler May or may not generate machine code Categories by their function Programming.
1 Introduction Chapter 1 n What is Assembly Language? n Data Representation.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CS-334: Computer.
Embedded System Spring, 2011 Lecture 4: The PIC Microcontrollers Eng. Wazen M. Shbair.
Embedded System Spring, 2011 Lecture 5: The PIC Microcontrollers Eng. Wazen M. Shbair.
The x86 PC Assembly Language, Design, and Interfacing By Muhammad Ali Mazidi, Janice Gillespie Mazidi and Danny Causey © 2010, 2003, 2000, 1998 Pearson.
Ass. Prof. Dr Masri Ayob TK 6123 Lecture 13: Assembly Language Level (Level 4)
Computer Architecture and Operating Systems CS 3230 :Assembly Section Lecture 3 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Computer Architecture EKT 422
Assembly Language ELEC 330 Digital Systems Engineering Dr. Ron Hayne.
MICROOCESSORS AND MICROCONTROLLER:
Chapter 10 Instruction Sets: Characteristics and Functions Felipe Navarro Luis Gomez Collin Brown.
Assembly Language programming
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
1 EKT 225 MICROCONTROLLER I CHAPTER ASSEMBLY LANGUAGE PROGRAMMING.
RISC / CISC Architecture by Derek Ng. Overview CISC Architecture RISC Architecture  Pipelining RISC vs CISC.
Instruction Sets: Characteristics and Functions  Software and Hardware interface Machine Instruction Characteristics Types of Operands Types of Operations.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
Computer Organization Exam Review CS345 David Monismith.
Computer Architecture & Operations I
Computer Architecture & Operations I
INTRODUCTION TO AVRASSEMBLY PROGRAMMING
Microprocessor and Microcontroller Fundamentals
Microprocessor and Microcontroller Fundamentals
COMP2121: Microprocessors and Interfacing
Lecture 6: Assembly Programs
Assembly Language programming
IPCOWALA INSTITUTE OF ENGINEERING & TECHNOLOGY-DHARMAJ
The 8051 Microcontroller and Embedded Systems
PIC – ch. 2b Md. Atiqur Rahman Ahad.
A Closer Look at Instruction Set Architectures
COMP3221: Microprocessors and Embedded Systems
MIPS Assembly.
Introduction to Assembly Chapter 2
Computer Organization and ASSEMBLY LANGUAGE
CISC AND RISC SYSTEM Based on instruction set, we broadly classify Computer/microprocessor/microcontroller into CISC and RISC. CISC SYSTEM: COMPLEX INSTRUCTION.
CSCI206 - Computer Organization & Programming
Lecture 7: Examples, MARS, Arithmetic
Introduction to Assembly Chapter 2
ECEG-3202 Computer Architecture and Organization
Chapter 9 Instruction Sets: Characteristics and Functions
MARIE: An Introduction to a Simple Computer
ECEG-3202 Computer Architecture and Organization
CS 286 Computer Organization and Architecture
8051 ASSEMBLY LANGUAGE PROGRAMMING
Computer Architecture and System Programming Laboratory
Part I Data Representation and 8086 Microprocessors
Chapter 10 Instruction Sets: Characteristics and Functions
Presentation transcript:

PIC – ch. 2c

2.5 PIC Data formats Numbers can be – Hex – Binary – Decimal – ASCII formats

4 ways to show HEX numbers – – 34h, 23H – 0x23, 0X34 – Nothing, just the value: 23, 45 – h‘45’ E4h – x0E4h – ok! 0F – ok! 0F = 0Fh

B’ ’ b’ ’

D’45’ d’56’. 67

ASCII character A’2’ A’9’ To define ASCII strings [more than one character], use DB (define byte) directive.

EQU – equate EQU  To assign – fixed data – SFR address [SFR – special-function reg.] & GPR COUNTEQU0x25… MOVLWCOUNT ; WREG = 25h

ORG – origin ODG directive is used to indicate the beginning of the address. ORG must be in hex

END directive Last line of the PIC program.

#include Tells the assembler to use the libraries…

radix directive – To indicate the numbering system Hex? – by default Decimal?  radix dec  Numbers will be considered as decimal

Label: – 1 st character must be an alphabetic char. – 1 st char – NOT number – …

2.7 PIC prog – assembling & linking Source file - *.asm ASM file is fed to the PIC assembler – It converts codes into machine code – Produce object file - *.o, error file *.err

Linking – – *.hex file – List file -*.lst – Map file -*.map – Debug file -*.cod After a successful link – hex file is ready to be burned into the PIC’s program ROM and is downloaded into the PIC Trainers.

Little endian vs. big endian LE – Low byte goes to low memory & high byte goes to the high mem. address E.g., all Intel microprocessors …

2.9 RISC Q. How to increase the processing power of a CPU? – Increase the clock frequency of the chip. Higher the frequency, the more power & dissipation – Use Harvard architecture – increase the no. of buses to bring more info (code & data) PIC18 has Harvard acrchi. – Change internal architecture of the CPU & use RISC architecture

RISC or CISC? RISC – reducedCISC – complex RISC processors have fixed instruction size 1, 2, or even 3 bytes Large no. of registers – at least 32 reg. - Large no. registers can avoid the need for a large stack to store parameters Small instruction set. -Less instruc. – difficult for programmers! -Large programs. -Need more memory – but memory is cheap now! -PIC16 has 35 instructions -PIC18 has 75 instructions CISC – Complete/Complex instr. Set computer! - Not all instrc. are used n not often too.!