Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

PIC microcontroller programming peripheral interface controller

Rating
-
Sold
-
Pages
30
Uploaded on
11-01-2023
Written in
2022/2023

PIC microcontroller programming peripheral interface controller

Institution
Course

Content preview

Module-4
PIC Programming




Addressing modes: Immediate and Direct Addressing modes, Register
Indirect Addressing mode, Lookup table and table processing, Bit
Addressability of Data RAM, Macros and Modules, types and Time
delays, I/O Programming and Logical Operations, Data Serialization

,The CPU can access data in various ways. The data could be in a register,
or in memory, or provided as an immediate value. These various ways
of accessing data are called addressing modes.
1. Immediate
2. Direct
3. Register indirect
IMMEDIATE AND DIRECT ADDRESSING MODES
Immediate addressing mode
In this addressing mode, the operand is a literal constant. In
immediate addressing mode, as the name implies, the operand comes
immediately after the opcode when the instruction is assembled.
Notice that immediate data is called a literal in the PIC. This
addressing mode can be used to load information into WREG and
selected registers, but not to any file register. The immediate addressing
mode is also used for arithmetic and logic instructions. Examine the
following examples.

, Direct addressing mode
As mentioned in Chapter 2, the 256-byte access bank file register is
split into two sections: The lower addresses, 00 to 7FH, are assigned to
the general purpose registers, and the upper addresses, F80--FFFH, to
the SFR. The access bank is the default bank when the PIC 18 is
powered up. It is the minimum bank that all PIC18 processors have. The
MOVFF instruction also plays a role in choosing the access bank.
• The entire data RAM file register can be accessed using either
direct or register indirect addressing modes.
• In direct addressing mode, the operand data is in a RAM memory
location whose address is known, and this address is given as a part
of the instruction. Contrast this with immediate addressing mode
in which the operand data itself is provided with the instruction.
While the letter "L" in the instruction means literal (immediate),
the letter "F" in the instruction signifies the address of the file
register location

Written for

Institution
Course

Document information

Uploaded on
January 11, 2023
Number of pages
30
Written in
2022/2023
Type
Class notes
Professor(s)
R3fw3
Contains
All classes

Subjects

$15.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
varsshinirju

Get to know the seller

Seller avatar
varsshinirju JAIN UNIVERSITY
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
42
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions