PIC18F4431-E/ML Microchip Technology, PIC18F4431-E/ML Datasheet

IC MCU FLASH 8KX16 44QFN

PIC18F4431-E/ML

Manufacturer Part Number
PIC18F4431-E/ML
Description
IC MCU FLASH 8KX16 44QFN
Manufacturer
Microchip Technology
Series
PIC® 18Fr

Specifications of PIC18F4431-E/ML

Core Processor
PIC
Core Size
8-Bit
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
36
Program Memory Size
16KB (8K x 16)
Program Memory Type
FLASH
Eeprom Size
256 x 8
Ram Size
768 x 8
Voltage - Supply (vcc/vdd)
4.2 V ~ 5.5 V
Data Converters
A/D 9x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 125°C
Package / Case
44-QFN
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
1.0
This document includes the programming specifications
for the following devices:
• PIC18F2331
• PIC18F2431
• PIC18F4331
• PIC18F4431
2.0
PIC18FXX31 devices can be programmed using either
the high voltage In-Circuit Serial Programming
(ICSP
Both of these can be done with the device in the users’
system. The low voltage ICSP method is slightly differ-
ent than the high voltage method, and these differ-
ences are noted where applicable. This programming
specification applies to PIC18FXX31 devices in all
package types.
TABLE 2-1:
 2010 Microchip Technology Inc.
MCLR/V
V
V
AV
AV
RB5
RB6
RB7
Legend:
Note 1:
DD
SS
Pin Name
DD
SS
(2)
(2)
TM
2:
) method, or the low voltage ICSP method.
DEVICE OVERVIEW
PROGRAMMING OVERVIEW
OF THE PIC18FXX31
PP
Flash Microcontroller Programming Specification
I = Input, O = Output, P = Power
See Section 5.3 for more detail.
All power supply and ground must be connected, including AV
PIN DESCRIPTIONS (DURING PROGRAMMING): PIC18FXX31
Pin Name
SDATA
SCLK
AV
AV
PGM
V
V
V
DD
PP
SS
DD
SS
Pin Type
PIC18F2331/2431/4331/4431
I/O
P
P
P
P
P
I
I
Programming Enable
Power Supply
Ground
Analog Power Supply
Analog Ground
Low Voltage ICSP™ Input when LVP Configuration bit equals ‘1’
Serial Clock
Serial Data
TM
During Programming
2.1
In High Voltage ICSP mode, the PIC18FXX31 requires
two programmable power supplies: one for V
one for MCLR/V
minimum resolution of 0.25V. Refer to Section 6.0 for
additional hardware parameters.
2.1.1
In Low Voltage ICSP mode, the PIC18FXX31 can be
programmed using a V
range. This only means that MCLR/V
to be brought to a different voltage but can instead be
left at the normal operating voltage. Refer to
Section 6.0 for additional hardware parameters.
2.2
The pin diagrams for the PIC18FXX31 family are
shown in Figure 2-1, Figure 2-2, and Figure 2-3. The
pin descriptions of these diagrams do not represent the
complete functionality of the device types. Users
should refer to the appropriate device data sheet for
complete pin descriptions.
Hardware Requirements
Pin Diagrams
DD
Pin Description
LOW VOLTAGE ICSP
PROGRAMMING
and AV
PP
. Both supplies should have a
SS
.
DD
source in the operating
PP
DS30500B-page 1
does not have
DD
(1)
and

Related parts for PIC18F4431-E/ML

PIC18F4431-E/ML Summary of contents

Page 1

... Flash Microcontroller Programming Specification 1.0 DEVICE OVERVIEW This document includes the programming specifications for the following devices: • PIC18F2331 • PIC18F2431 • PIC18F4331 • PIC18F4431 2.0 PROGRAMMING OVERVIEW OF THE PIC18FXX31 PIC18FXX31 devices can be programmed using either the high voltage In-Circuit Serial Programming (ICSP TM ) method, or the low voltage ICSP method. Both of these can be done with the device in the users’ ...

Page 2

... DS30500B-page 2 • RB7/KBI3/PGD RB6/KBI2/PGC (1) RB5/KBI1/PWM4/PGM RB4/KBI0/PWM5 RB3/PWM3 RB2/PWM2 RB1/PWM1 RB0/PWM0 RC7/RX/DT/SDO RC6/TX/CK/SS RC5/INT2/SCK/SCL RC4/INT1/SDI/SDA RB7/KBI3/PGD RB6/KBI2/PGC (2) RB5/KBI1/PWM4/PGM RB4/KBI0/PWM5 RB3/PWM3 RB2/PWM2 RB1/PWM1 RB0/PWM0 RD7/PWM7 RD6/PWM6 (4) RD5/PWM4 (3) RD4/FLTA (1) RC7/RX/DT/SDO RC6/TX/CK/SS (1) (1) RC5/INT2/SCK /SCL (1) (1) RC4/INT1/SDI /SDA RD3/SCK/SCL RD2/SDI/SDA  2010 Microchip Technology Inc. ...

Page 3

... SCK/SCL. 2: Low voltage programming must be enabled. 3: RD4 is the alternate pin for FLTA. 4: RD5 is the alternate pin for PWM4.  2010 Microchip Technology Inc. PIC18F2331/2431/4331/4431 RC0/T1OSO/T1CKI 2 OSC2/CLKO/RA6 31 3 OSC1/CLKI/RA7 30 4 PIC18F4331 PIC18F4431 RE2/AN8 27 7 RE1/AN7 26 8 RE0/AN6 9 25 RA5/AN5/LVDIN RA4/AN4/CAP3/QEB DS30500B-page 3 ...

Page 4

... RC3 is the alternate pin for T0CKI/T5CKI, RC4 is the alternate pin for SDI/SDA, RC5 is the alternate pin for SCK/SCL. 2: Low voltage programming must be enabled. 3: RD4 is the alternate pin for FLTA. 4: RD5 is the alternate pin for PWM4. DS30500B-page 4 33 OSC2/CLKO/RA6 1 32 OSC1/CLKI/RA7 PIC18F4331 PIC18F4431 RE2/AN8 27 7 RE1/AN7 26 8 RE0/AN6 9 25 RA5/AN5/LVDIN RA4/AN4/CAP3/QEB 11 SS  2010 Microchip Technology Inc. ...

Page 5

... Configuration and ID Space 3FFFFFh Note: Sizes of memory areas not to scale.  2010 Microchip Technology Inc. PIC18F2331/2431/4331/4431 TABLE 2-2: Device PIC18F2331 PIC18F4331 PIC18F2431 PIC18F4431 MEMORY SIZE/DEVICE 8 Kbytes 16 Kbytes Address (PIC18FX331) (PIC18FX431) Range 0000h Boot Block Boot Block 0FFFh 0200h Block 0 Block 0 ...

Page 6

... ID Location 8 CONFIG1L CONFIG1H CONFIG2L CONFIG2H CONFIG3L CONFIG3H CONFIG4L CONFIG4H CONFIG5L CONFIG5H CONFIG6L CONFIG6H CONFIG7L CONFIG7H Device ID1 Device ID2  2010 Microchip Technology Inc. TBLPTRL Addr[7:0] 200000h 200001h 200002h 200003h 200004h 200005h 200006h 200007h 300000h 300001h 300002h 300003h 300004h 300005h 300006h ...

Page 7

... Verify mode places all unused I/Os in the high impedance state. FIGURE 2-6: ENTERING HIGH VOLTAGE PROGRAM/ VERIFY MODE P13 P12 P1 D110 MCLR SDATA SCLK SDATA = Input  2010 Microchip Technology Inc. PIC18F2331/2431/4331/4431 FIGURE 2-7: accessed and FIGURE 2-8: MCLR PGM SDATA SCLK HIGH LEVEL PROGRAMMING FLOW Start ...

Page 8

... Data Payload SDATA = Input COMMANDS FOR PROGRAMMING 4-Bit Description Command 0000 0010 1000 1001 1010 1011 1100 1101 1110 1111 SAMPLE COMMAND SEQUENCE Data Core Instruction Payload 3C 40 Table Write, post-increment P5A Fetch Next 4-bit Command  2010 Microchip Technology Inc. ...

Page 9

... FIGURE 3-2: BULK ERASE TIMING SCLK SDATA 4-bit Command 16-bit Data Payload  2010 Microchip Technology Inc. PIC18F2331/2431/4331/4431 TABLE 3-2: 4-Bit Command 0000 0000 0000 0000 0000 0000 1100 0000 Data 0000 80h 81h 83h FIGURE 3-1: 88h 89h 8Ah 8Bh ...

Page 10

... Programming” command, and parameters P9 and P10 is shown in Figure 3-6. Note: The TBLPTR register must contain the same offset value when initiating the pro- gramming sequence as it did when the write buffers were loaded.  2010 Microchip Technology Inc. ...

Page 11

... Step 5: Repeat step 4, with Address Pointer incremented by 64 until all panels are erased. FIGURE 3-3: MULTI-PANEL SINGLE ROW ERASE CODE MEMORY FLOW Addr = Addr + 64  2010 Microchip Technology Inc. PIC18F2331/2431/4331/4431 Core Instruction BSF EECON1, EEPGD BSF EECON1, CFGS ...

Page 12

... The TBLPTR register must contain the same offset value when initiating the pro- gramming sequence as it did when the write buffers were loaded. Offset = TBLPTR<12:3> Offset = TBLPTR<12:3> Erase Region (64 bytes) Offset = TBLPTR<12:6> Erase Region (64 bytes) Offset = TBLPTR<12:6>  2010 Microchip Technology Inc. ...

Page 13

... To continue writing data, repeat steps 2 through 5, where the Address Pointer is incremented each panel at each iteration of the loop.  2010 Microchip Technology Inc. PIC18F2331/2431/4331/4431 Core Instruction BSF EECON1, EEPGD BSF EECON1, CFGS BSF EECON1, WREN ...

Page 14

... All No Panel Buffers Written? Yes Start Write Sequence and Hold SCLK High until Done Delay P9+P10 Time for Write to Occur All No Locations Done? Yes Done P5A 4-bit Command SDATA = Input P10 16-bit Programming Time Data Payload  2010 Microchip Technology Inc. ...

Page 15

... In this case, however assumed that the address space to be written already has data in it (i.e not blank).  2010 Microchip Technology Inc. PIC18F2331/2431/4331/4431 The minimum amount of code memory that may be erased at a given time is 64 bytes. Again, the device must be placed in Single Panel Write mode ...

Page 16

... MOVLW <Addr[8:15]> MOVWF TBLPTRH MOVLW <Addr[7:0]> MOVWF TBLPTRL Write 2 bytes and post-increment address by 2 Write 2 bytes and post-increment address by 2 Write 2 bytes and post-increment address by 2 Write 2 bytes and start programming NOP - hold SCLK high for time P9  2010 Microchip Technology Inc. ...

Page 17

... SCLK P5 SDATA BSF EECON1, WR 4-bit Command SCLK Poll WR bit SDATA 4-bit Command  2010 Microchip Technology Inc. PIC18F2331/2431/4331/4431 FIGURE 3-7: P5A Poll WR bit, Repeat until Clear (see below) SDATA = Input P5A MOVWF TABLAT 4-bit Command MOVF EECON1 SDATA = Input PROGRAM DATA FLOW ...

Page 18

... BCF EECON1, CFGS MOVLW <Addr> MOVWF EEADR MOVLW <AddrH> MOVWF EEADRH MOVLW <Data> MOVWF EEDATA BSF EECON1, WREN MOVLW 0X55 MOVWF EECON2 MOVLW 0XAA MOVWF EECON2 BSF EECON1, WR MOVF EECON1 MOVWF TABLAT (1) Shift out data BCF EECON1, WREN  2010 Microchip Technology Inc. ...

Page 19

... In order to modify the ID locations, refer to the method- ology described in Section 3.2.2, “Modifying Code Memory”. As with code memory, the ID locations must be erased before modified.  2010 Microchip Technology Inc. PIC18F2331/2431/4331/4431 Note: Even though multi-panel writes are dis- abled, the user must still fill the 8-byte data buffer for the panel ...

Page 20

... Load 2 bytes and start programming NOP - hold SCLK high for time P9 INCF TBLPTRL Load 2 bytes and start programming NOP - hold SCLK high for time P9 Load Odd Configuration Address Program Delay P9 Time for Write Start MSB Done  2010 Microchip Technology Inc. ...

Page 21

... SDATA SDATA = Input  2010 Microchip Technology Inc. PIC18F2331/2431/4331/4431 The 4-bit command is shifted in LSb first. The table read is executed during the next 8 clocks, then shifted out on SDATA during the last 8 clocks, LSb to MSb. A delay of P6 must be introduced after the falling edge of the 8th SCLK of the operand to allow SDATA to transi- tion from an input to an output ...

Page 22

... Set Pointer = 200000h Read Low Byte Read High byte No Failure, Word = Expect Report Error No Does No Failure, Data? Report Error Yes All ID Locations Verified? Yes Done  2010 Microchip Technology Inc. ...

Page 23

... SCLK of the operand to allow SDATA to transition from an input to an output. During this time, SCLK must be held low (see Figure 4-4). The command sequence to read a single byte of data is shown in Table 4-2.  2010 Microchip Technology Inc. PIC18F2331/2431/4331/4431 FIGURE 4-3: No READ DATA EEPROM ...

Page 24

... BCF EECON1, CFGS MOVLW <Addr> MOVWF EEADR MOVLW <AddrH> MOVWF EEADRH BSF EECON1, RD MOVF EEDATA MOVWF TABLAT (1) Shift Out Data P14 LSb Shift Data Out SDATA = Output P5A 5 6 MSb Fetch Next 4-bit Command SDATA = Input  2010 Microchip Technology Inc. ...

Page 25

... Unused (reserved) configuration bits will read ‘0’ (pro- grammed). Refer to Table 5-2 and Table 5-3 for blank configuration expect data for the various PIC18FXX31 devices.  2010 Microchip Technology Inc. PIC18F2331/2431/4331/4431 Given that “Blank Checking” is merely code and data EEPROM verification with FFh expect data, refer to Section 4 ...

Page 26

... TABLE 5-1: DEVICE ID VALUES Device PIC18F2331 PIC18F2431 PIC18F4331 PIC18F4431 Note: The ‘x’s in DEVID1 contain the device revision code. DS30500B-page 26 5.3 Low Voltage Programming (LVP) Bit The LVP bit in Configuration register, CONFIG4L, enables low voltage ICSP programming. The LVP bit defaults to a ‘ ...

Page 27

... CONFIG7H — EBTRB 3FFFFEh DEVID1 DEV2 DEV1 3FFFFFh DEVID2 DEV10 DEV9 Legend unknown unchanged unimplemented value depends on condition. Shaded cells are unimplemented, read as ‘0’.  2010 Microchip Technology Inc. PIC18F2331/2431/4331/4431 Bit 5 Bit 4 Bit 3 Bit 2 — — OSC OSC — ...

Page 28

... HPOL and LPOL. 4: This bit is reserved on PIC18F2X31 devices and should be maintained set (i.e., equal to ‘1’). 5: For PIC18FX431 devices only. DS30500B-page 28 Description set to 2.0V BOR set to 2.7V BOR set to 4.2V BOR set to 4.5V BOR 1) OSC  2010 Microchip Technology Inc. ...

Page 29

... HPOL and LPOL. 4: This bit is reserved on PIC18F2X31 devices and should be maintained set (i.e., equal to ‘1’). 5: For PIC18FX431 devices only.  2010 Microchip Technology Inc. PIC18F2331/2431/4331/4431 Description can enable the special event trigger signal from IC1 to reset the TMR5 time base. ...

Page 30

... HPOL and LPOL. 4: This bit is reserved on PIC18F2X31 devices and should be maintained set (i.e., equal to ‘1’). 5: For PIC18FX431 devices only. DS30500B-page 30 Description respectively. SDO output is multiplexed with RC7. respectively. SDO output is multiplexed with RD1. communication function)  2010 Microchip Technology Inc. ...

Page 31

... PWMEN<2:0> = 100 if the device has six PWM output pins (28-pin device). PWM output polarity is defined by HPOL and LPOL. 4: This bit is reserved on PIC18F2X31 devices and should be maintained set (i.e., equal to ‘1’). 5: For PIC18FX431 devices only.  2010 Microchip Technology Inc. PIC18F2331/2431/4331/4431 Description (1) DS30500B-page 31 ...

Page 32

... HPOL and LPOL. 4: This bit is reserved on PIC18F2X31 devices and should be maintained set (i.e., equal to ‘1’). 5: For PIC18FX431 devices only. DS30500B-page 32 Description other blocks blocks other blocks blocks other blocks blocks other blocks blocks other blocks other blocks  2010 Microchip Technology Inc. ...

Page 33

... An option to not include the configuration word information may be provided. When embedding configuration word information in the HEX file, it should start at address 300000h. Microchip Technology Inc. feels strongly that this feature is important for the benefit of the end customer.  2010 Microchip Technology Inc. PIC18F2331/2431/4331/4431 5 ...

Page 34

... Description CFGW = Configuration Word SUM[a:b] = Sum of locations inclusive SUM_ID = Byte-wise sum of lower four bits of all customer ID locations + = Addition & = Bit-wise AND DS30500B-page 34 Checksum  2010 Microchip Technology Inc. 0xAA at 0 Blank and Max Value Address E464 E3BA E640 E5F5 043D 0447 ...

Page 35

... Legend: Item Description CFGW = Configuration Word SUM[a:b] = Sum of locations inclusive SUM_ID = Byte-wise sum of lower four bits of all customer ID locations + = Addition & = Bit-wise AND  2010 Microchip Technology Inc. PIC18F2331/2431/4331/4431 Checksum 0xAA at 0 Blank and Max Value Address C488 C3DE C668 ...

Page 36

... Description CFGW = Configuration Word SUM[a:b] = Sum of locations inclusive SUM_ID = Byte-wise sum of lower four bits of all customer ID locations + = Addition & = Bit-wise AND DS30500B-page 36 Checksum  2010 Microchip Technology Inc. 0xAA at 0 Blank and Max Value Address E3A4 E2FA E5C3 E578 03C0 03CA ...

Page 37

... PIC18F4431 SUM(IDs) Boot SUM(2000:2FFF)+SUM(3000:3FFF)+(CONFIG0 & 0000)+ Block/ (CONFIG1 & ...

Page 38

... PP 10 — ns  s 2 — PP  2010 Microchip Technology Inc. Conditions Normal programming V Bulk erase operations 8 -3 meet AC specifications 2.0V DD ...

Page 39

... REAL ICE, rfLAB, Select Mode, Total Endurance, TSHARC, UniWinDriver, WiperLock and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. ...

Page 40

... Fax: 886-3-6578-370 Taiwan - Kaohsiung Tel: 886-7-536-4818 Fax: 886-7-536-4803 Taiwan - Taipei Tel: 886-2-2500-6610 Fax: 886-2-2508-0102 Thailand - Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350  2010 Microchip Technology Inc. EUROPE Austria - Wels Tel: 43-7242-2244-39 Fax: 43-7242-2244-393 Denmark - Copenhagen Tel: 45-4450-2828 Fax: 45-4485-2829 France - Paris Tel: 33-1-69-53-63-20 ...

Related keywords