PIC18LF2431-I/SP Microchip Technology, PIC18LF2431-I/SP Datasheet - Page 66

IC MCU FLASH 8KX16 28-DIP

PIC18LF2431-I/SP

Manufacturer Part Number
PIC18LF2431-I/SP
Description
IC MCU FLASH 8KX16 28-DIP
Manufacturer
Microchip Technology
Series
PIC® 18Fr

Specifications of PIC18LF2431-I/SP

Core Size
8-Bit
Program Memory Size
16KB (8K x 16)
Core Processor
PIC
Speed
40MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, LVD, Power Control PWM, QEI, POR, PWM, WDT
Number Of I /o
24
Program Memory Type
FLASH
Eeprom Size
256 x 8
Ram Size
768 x 8
Voltage - Supply (vcc/vdd)
2 V ~ 5.5 V
Data Converters
A/D 5x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
28-DIP (0.300", 7.62mm)
Controller Family/series
PIC18
No. Of I/o's
24
Eeprom Memory Size
256Byte
Ram Memory Size
768Byte
Cpu Speed
40MHz
No. Of Timers
4
Processor Series
PIC18LF
Core
PIC
Data Bus Width
8 bit
Data Ram Size
768 B
Interface Type
EUSART, I2C, SPI, SSP
Maximum Clock Frequency
40 MHz
Number Of Programmable I/os
24
Number Of Timers
1 x 8
Operating Supply Voltage
2 V to 5.5 V
Maximum Operating Temperature
+ 85 C
Mounting Style
Through Hole
3rd Party Development Tools
52715-96, 52716-328, 52717-734, 52712-325, EWPIC18
Development Tools By Supplier
PG164130, DV164035, DV244005, DV164005, PG164120, ICE2000, ICE4000, DM183021, DV164136
Minimum Operating Temperature
- 40 C
On-chip Adc
5 bit
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
program memory address embedded into the instruction.
PIC18F2331/2431/4331/4431
5.7
The program memory is addressed in bytes. Instructions
are stored as two bytes or four bytes in program memory.
The Least Significant Byte of an instruction word is
always stored in a program memory location with an
even address (LSB = 0). Figure 5-5 shows an example of
how instruction words are stored in the program memory.
To maintain alignment with instruction boundaries, the
PC increments in steps of 2 and the LSB will always read
‘0’ (see Section 5.4 “PCL, PCLATH and PCLATU”).
The CALL and GOTO instructions have the absolute
Since instructions are always stored on word boundaries,
the data contained in the instruction is a word address.
The word address is written to PC<20:1>, which
accesses the desired byte address in program memory.
Instruction 2 in Figure 5-5 shows how the instruction
‘GOTO 000006h’ is encoded in the program memory.
Program branch instructions, which encode a relative
address offset, operate in the same manner. The offset
value stored in a branch instruction represents the num-
ber of single-word instructions that the PC will be offset
by. Section 23.0 “Instruction Set Summary” provides
further details of the instruction set.
FIGURE 5-5:
EXAMPLE 5-3:
DS39616C-page 64
CASE 1:
Object Code
CASE 2:
Object Code
0110 0110 0000 0000
1100 0001 0010 0011
1111 0100 0101 0110
0010 0100 0000 0000
0110 0110 0000 0000
1100 0001 0010 0011
1111 0100 0101 0110
0010 0100 0000 0000
Instructions in Program Memory
Instruction 1:
Instruction 2:
Instruction 3:
INSTRUCTIONS IN PROGRAM MEMORY
TWO-WORD INSTRUCTIONS
Source Code
TSTFSZ
Source Code
MOVFF
ADDWF
TSTFSZ
MOVFF
ADDWF
Program Memory
Byte Locations
MOVLW
GOTO
MOVFF
REG1
REG1, REG2
REG3
REG1
REG1, REG2
REG3
055h
000006h
123h, 456h
Preliminary
LSB = 1
5.7.1
PIC18F2331/2431/4331/4431 devices have four two-
word instructions: MOVFF, CALL, GOTO and LFSR. The
second word of these instructions has the 4 MSBs set
to ‘1’s and is decoded as a NOP instruction. The lower
12 bits of the second word contain data to be used by
the instruction. If the first word of the instruction is
executed, the data in the second word is accessed. If
the second word of the instruction is executed by itself
(first word was skipped), it will execute as a NOP. This
action is necessary when the two-word instruction is
preceded by a conditional instruction that results in a
skip operation. A program example that demonstrates
this concept is shown in Example 5-3. Refer to
Section 23.0 “Instruction Set Summary” for further
details of the instruction set.
EFh
C1h
0Fh
F0h
F4h
; is RAM location 0?
; No, skip this word
; Execute this word as a NOP
; continue code
; is RAM location 0?
; Yes, execute this word
; 2nd word of instruction
; continue code
TWO-WORD INSTRUCTIONS
LSB = 0
55h
03h
00h
23h
56h
Word Address
© 2007 Microchip Technology Inc.
00000Ah
00000Ch
00000Eh
000000h
000002h
000004h
000006h
000008h
000010h
000012h
000014h

Related parts for PIC18LF2431-I/SP