Home/Products/Integrated Circuits ICs, Microcontrollers (MCU)/PIC18F4331-I
PIC18F4331-I
PIC18 motor control MCU, 8KB Flash, 768B RAM, 256B EEPROM, 9-ch 10-bit 200Ksps ADC, 8 PWM, QEI encoder interface, 3 capture, SPI/I2C, EUSART/LIN, 40-pin
Effective inventoryPCS

SpecificationsTechnical data
Manufacturer part
PIC18F4331-I
Package
40-pin PDIP / 44-pin TQFP / QFN
Brand
MICROCHIP
Category
Integrated Circuits ICs, Microcontrollers (MCU)
Quality Commitment
Shipping & Payment
Service & Packaging
DescriptionProduct overview
Product Overview
The PIC18F4331-I is a 40/44-pin, 8-bit high-performance Flash microcontroller from Microchip Technology featuring the PIC18 architecture with advanced motion control peripherals. With 4096 single-word instructions and a 31-level deep hardware stack, this motor-control-optimized MCU offers 8KB (4K x 16) of Flash program memory, 768 bytes of RAM, and 256 bytes of data EEPROM. Operating at up to 40 MHz (10 MIPS), it integrates a 9-channel 10-bit 200 Ksps ADC, a Motion Feedback Module with Quadrature Encoder Interface (QEI), three capture inputs, eight Power Control PWM outputs, two analog comparators, an MSSP (SPI/I2C), an Enhanced Addressable USART with LIN support, and an 8 MHz internal oscillator with PLL. Designed specifically for advanced motor control and motion applications, the PIC18F4331 combines high-current PWM with encoder feedback capability, making it ideal for BLDC motors, servo systems, industrial drives, and automotive motor control applications requiring position feedback.
Key Specifications
| Core Architecture | 8-bit PIC18 RISC Architecture |
| Program Memory | 8KB Flash (4K x 16 words) |
| RAM | 768 bytes |
| Data EEPROM | 256 bytes |
| Maximum Speed | 40 MHz (10 MIPS) |
| Operating Voltage | 4.2V to 5.5V |
| I/O Pins | 36 |
| ADC | 10-bit, 9 channels, 200 Ksps |
| Comparators | 2 analog comparators |
| Timers | 4 timers (TMR0 8/16-bit, TMR1/3/5 16-bit) |
| PWM | 8 PWM outputs (Power Control PWM module) |
| QEI | Quadrature Encoder Interface (Motion Feedback Module) |
| Input Capture | 3 input capture channels |
| Communication | SPI, I2C (MSSP), EUSART/LIN |
| Internal Oscillator | 8 MHz, 6 selectable frequencies |
| PLL | 4x PLL (up to 32 MHz with internal osc) |
| Stack Levels | 31-level hardware stack |
| Hardware Multiplier | 8 x 8 single-cycle hardware multiplier |
| Low Power | nanoWatt technology |
| Debug | In-Circuit Debug (ICD) |
| Operating Temperature | -40°C to +85°C (Industrial) |
| Package | 40-pin PDIP / 44-pin TQFP / QFN |
Features
- High-performance PIC18 RISC CPU with 10 MIPS at 40 MHz
- 16-bit wide instructions, 8-bit wide data path
- 31-level deep software accessible hardware stack
- 8 x 8 single-cycle hardware multiplier
- Priority levels for interrupts
- Power Control PWM Module: 8 PWM outputs
- Half-bridge, full-bridge, push-pull, and single PWM modes
- Programmable dead time and auto-shutdown on fault
- Motion Feedback Module (MFM) with Quadrature Encoder Interface (QEI)
- Three independent Input Capture channels with Timer5 time base
- 9-channel 10-bit ADC with 200 Ksps conversion rate
- Programmable acquisition time for reduced software overhead
- Two analog comparators with programmable voltage reference
- Master Synchronous Serial Port (MSSP): SPI and I2C
- Enhanced Addressable USART with LIN/J2602 support
- Auto-baud detect and auto-wake-up on Start bit
- 16-bit Baud Rate Generator for high resolution
- Internal 8 MHz oscillator with 6 selectable frequencies
- 4x Phase Lock Loop (PLL)
- Fail-Safe Clock Monitor and Two-Speed Oscillator Start-up
- Timer0: 8/16-bit timer/counter with 8-bit prescaler
- Timer1, Timer3, Timer5: 16-bit timer/counters with prescaler
- Power-managed modes: Run, Idle, Sleep
- Extended Watchdog Timer (WDT) with 16-bit prescaler
- Brown-out Reset (BOR) and Power-on Reset (POR)
- Self-programmable under software control
- In-Circuit Serial Programming (ICSP) via two pins
- In-Circuit Debug (ICD) support
- Programmable code protection
- 36 I/O pins with 25 mA sink/source capability
Applications
- Brushless DC (BLDC) motor control with encoder feedback
- Servo motor control and positioning systems
- Industrial motor drives and inverters
- Automotive motor control (fuel pumps, fans, actuators)
- Robotics and motion control systems
- Power conversion and inverter systems
- Industrial automation with position feedback
01PIC18F4331-I · Product Introduction
02PIC18F4331-I · Working Principle
03PIC18F4331-I · Pin Description
| Pin (PDIP-40) | Name | Type | Function |
|---|---|---|---|
| 1 | MCLR/VPP/RE3 | I/P | Master Clear / VPP / Port E I/O |
| 2 | RA0/AN0 | I/O | Port A I/O / ADC Channel 0 |
| 3 | RA1/AN1 | I/O | Port A I/O / ADC Channel 1 |
| 4 | RA2/AN2/VREF- | I/O | Port A I/O / ADC2 / Vref Negative |
| 5 | RA3/AN3/VREF+ | I/O | Port A I/O / ADC3 / Vref Positive |
| 6 | RA4/T0CKI | I/O | Port A I/O / Timer0 Clock Input |
| 7 | RA5/AN4/LVDIN | I/O | Port A I/O / ADC4 / LVD Input |
| 8 | RE0/AN6/RD | I/O | Port E I/O / ADC6 |
| 9 | RE1/AN7/WR | I/O | Port E I/O / ADC7 |
| 10 | RE2/AN8/CS | I/O | Port E I/O / ADC8 |
| 11 | VSS | P | Ground Reference |
| 12 | RD0/PWM0 | I/O | Port D I/O / PWM Output 0 |
| 13 | RD1/PWM1 | I/O | Port D I/O / PWM Output 1 |
| 14 | RD2/PWM2 | I/O | Port D I/O / PWM Output 2 |
| 15 | RD3/PWM3 | I/O | Port D I/O / PWM Output 3 |
| 16 | RC0/T1OSO/T1CKI | I/O | Port C I/O / T1OSO / Timer1 Clock |
| 17 | RC1/T1OSI | I/O | Port C I/O / T1OSI |
| 18 | RC2/CCP1 | I/O | Port C I/O / CCP1 |
| 19 | RC3/SCK/SCL | I/O | Port C I/O / SPI Clock / I2C Clock |
| 20 | RD4/FLTA | I/O | Port D I/O / PWM Fault Input A |
| 21 | RD5/PWM4 | I/O | Port D I/O / PWM Output 4 |
| 22 | RD6/PWM6 | I/O | Port D I/O / PWM Output 6 |
| 23 | RD7/PWM7 | I/O | Port D I/O / PWM Output 7 |
| 24 | RC4/SDI/SDA | I/O | Port C I/O / SPI DI / I2C Data |
| 25 | RC5/SDO | I/O | Port C I/O / SPI Data Out |
| 26 | RC6/TX/CK | I/O | Port C I/O / EUSART TX/Clock |
| 27 | RC7/RX/DT | I/O | Port C I/O / EUSART RX/Data |
| 28 | VSS | P | Ground Reference |
| 29 | VDD | P | Positive Supply Voltage |
| 30 | RB0/INT0/PWM5 | I/O | Port B I/O / Ext Int0 / PWM5 |
| 31 | RB1/AN5/C1IN+/QEA | I/O | Port B I/O / ADC5 / Comp1+ / QEI Phase A |
| 32 | RB2/C1OUT/C2OUT/QEB | I/O | Port B I/O / Comp Out / QEI Phase B |
| 33 | RB3/PGM/C2IN+/INDX | I/O | Port B I/O / LVP / Comp2+ / QEI Index |
| 34 | RB4/CAP1 | I/O | Port B I/O / Input Capture 1 |
| 35 | RB5/CAP2 | I/O | Port B I/O / Input Capture 2 |
| 36 | RB6/ICSPCLK/CAP3 | I/O | Port B I/O / ICSP Clock / Input Capture 3 |
| 37 | RB7/ICSPDAT | I/O | Port B I/O / ICSP Data |
| 38 | OSC1/CLKIN | I | Oscillator Input / Clock Input |
| 39 | OSC2/CLKOUT | O | Oscillator Output / Clock Output |
| 40 | VDD | P | Positive Supply Voltage |
04PIC18F4331-I · Application Scenarios
- BLDC motor control with encoder feedback (FOC/sensored)
- Servo motor positioning and motion control systems
- Industrial AC drives and frequency inverters
- Automotive actuators with position feedback
- Robotic joint control and motion platforms
- Switch-mode power supplies with current mode control
- Industrial conveyor and packaging machine control
05PIC18F4331-I · Alternative Models
| Manufacturer | Part Number | Package | Notes |
|---|---|---|---|
| Microchip | PIC18F4431-I | 40-pin | 16KB Flash, 768B RAM, same peripherals |
| Microchip | PIC18F2431-I | 28-pin | 16KB Flash, 5-ch ADC, QEI, 28-pin package |
| Microchip | PIC18F2331-I | 28-pin | 8KB Flash, 5-ch ADC, QEI, lower cost |
| Microchip | PIC18LF4331-I | 40-pin | Low-voltage version, 2.0-5.5V |
| Microchip | dsPIC33FJ32MC204-I | 44-pin | 16-bit DSC, DSP engine, advanced motor control |
Request a quoteWithin 24h
Tell us the quantity you need. We confirm price and availability within one business day.
IC-Vendor · Sourcing
Verified stock, quoted fast.
Recommended

PIC18F1330-I
PIC18 8-bit MCU, 8KB Flash, 256B RAM, 128B EEPROM, 4-ch 10-bit ADC, 6 PWM (motor control), 3 comparators, EUSART/LIN, 18-pin
IN STOCK: 4530pcs
Cargo cycle: 3~7 Days
The minimum order is 1

MC9S08AW16CFGE
8-bit HCS08 MCU, 16KB Flash, 1KB RAM, LQFP-48
IN STOCK: 13379pcs
Cargo cycle: 3~7 Days
The minimum order is 1

PIC16F886-I
8-bit PIC MCU, 14KB Flash, 368B RAM, 256B EEPROM, 11-ch 10-bit ADC, ECCP+CCP, EUSART/LIN, SPI/I2C, internal 8MHz osc, ICD, industrial -40°C~85°C
IN STOCK: 3997pcs
Cargo cycle: 3~7 Days
The minimum order is 1

PIC32MX795F512L-80I/PT
MIPS32 MCU, 80MHz, 512KB Flash, Ethernet, dual CAN, USB OTG, 100-TQFP
IN STOCK: 5670pcs
Cargo cycle: 3~7 Days
The minimum order is 1

GD32F303CCT6
Cortex-M4 32-bit MCU, 120MHz, 256KB Flash, 48KB SRAM, LQFP-48
IN STOCK: 7002pcs
Cargo cycle: 3~7 Days
The minimum order is 1

PIC18F25K22-I
PIC18 XLP MCU, 32KB Flash, 1.5KB RAM, 256B EEPROM, 17-ch 10-bit ADC, 5 PWM, 2 comp, dual SPI/I2C, EUSART/LIN, CTMU, 64MHz, 28-pin
IN STOCK: 10732pcs
Cargo cycle: 3~7 Days
The minimum order is 1
Quality Commitment
Every order is sourced, inspected and documented so your production line receives parts that meet specification.
Authenticity & traceability
We supply original manufacturer parts or material from authorized distribution channels. Unless a listing states otherwise, parts are new and unused — not refurbished, re-marked or pulled from used equipment. Each shipment is traceable to its purchase lot, date code and supplier record.
Incoming inspection
- Visual inspection of labels, packaging, marking and date codes.
- Lot and quantity verification against the purchase order.
- Moisture-sensitivity and ESD packaging checks.
- Electrical and functional testing, curve tracing, X-ray or decapsulation available on request.
Documentation
Commercial invoice and packing list are included with every shipment. A Certificate of Conformance (CoC) showing part number, quantity, lot/date code and inspection result is available on request. RoHS/REACH declarations and conflict-minerals statements can be supplied for compliance programs.
Warranty & returns
Parts are warranted against manufacturer defects for 12 months from shipment unless otherwise agreed in writing. Quality claims should be raised within 30 days of receipt with photos, the quantity affected and lot/date-code information. Special-order and non-cancellable/non-returnable (NCNR) items are handled case by case.
Counterfeit prevention
Suspect material is quarantined, documented and never resold. Suppliers are screened and monitored, and we support customer audits and third-party verification when required.
Shipping & Payment
From same-day dispatch on stock lines to consolidated production shipments, we keep logistics and payment predictable.
Lead time
In-stock lines usually ship the same or next business day. For backorder and factory-order items, lead time is confirmed in the quotation before you commit.
Carriers & tracking
We ship worldwide with DHL, FedEx, UPS and SF Express. Tracking details are sent as soon as the shipment is handed to the carrier. Customer carrier accounts can be used on request.
Freight & insurance
Freight is quoted prepaid-and-added, collect, or included depending on the agreed Incoterm (EXW, FOB, CIF or DDP). Shipment insurance is available on request; risk passes according to the agreed Incoterm.
Payment methods
- Bank transfer (T/T) in USD, EUR or CNY.
- PayPal for smaller or sample orders.
- Alipay / RMB transfer for domestic settlement.
A proforma invoice is issued for every order. New customers are normally prepaid; repeat customers may apply for net terms.
Order changes & cancellation
Please confirm changes before dispatch. Once material is allocated, cut tape/reel or shipped, cancellation may not be possible. Non-standard items are subject to NCNR terms.
Customs & duties
We provide commercial invoices and origin documentation. Import duties, taxes and customs clearance are the buyer’s responsibility unless DDP terms are agreed.
Service & Packaging
Beyond supplying the part, we support BOM sourcing, value-added processing and packaging that fits your line.
BOM sourcing & kitting
Send your BOM and we will cross-reference alternatives, consolidate lines and quote shortages. Kitting and kit-level labeling are available for production and repair centers.
Value-added services
- Programming and firmware loading.
- Tape-and-reel, re-reeling and tray packing.
- Baking and dry-pack for moisture-sensitive parts.
- Barcode, QR and custom label generation.
Packaging options
Parts are packed in ESD-safe bags, moisture-barrier bags with desiccant and humidity indicator, tape-and-reel, trays, tubes or bulk cartons. Custom labels, mixed kits and drop-ship to your contract manufacturer can be arranged.
Documentation & traceability
Each package carries the part number, quantity, lot/date code and country of origin. Packing lists and CoCs can be formatted to match your receiving process.
After-sales support
For returns, please contact us with the invoice number, part number and reason. We will issue an RMA and instructions before material is returned. Technical and order-status questions are answered within one business day.
