Microchip logo
Microchip logo
  • All
  • Products
  • Documents
  • Applications Notes

PIC18F "K42" Product Family

High Performance and Large Memory 8-bit MCUs

The PIC18F “K42” family of microcontrollers consists of 10 highly integrated products — ranging from 16-128 KB of flash memory with package options covering 28-48 pins. This family is equipped with a comprehensive and rich set of Core Independent Peripherals (CIP) and Intelligent Analog features allowing for many functional tasks to be done in hardware – saving code, validation time, core overhead, and power consumption.

The MCUs feature a 12-bit ADC with Computation (ADC2), Direct Memory Access (DMA), Vector Interrupt (VI) Controller and other system enhancements. They are ideal for an extensive range of applications and markets, including automotive, industrial control, Internet of Things (IoT), medical and white goods. The MCUs offer a full suite of Core Independent Peripherals for safety critical applications (Cyclic Redundancy Check with Memory Scan, Windowed Watchdog Timer, 24-bit Signal Measurement Timer, Hardware Limit Timer, Complementary Waveform Generation), up to eight hardware PWMs and multiple communications interfaces. They include a Configurable Logic Cell which integrates hardware functions to simplify and accelerate many common tasks.

Intelligent Analog

The products offer intelligent analog peripherals including Zero Cross Detect (ZCD), on-chip comparator, and a 12-bit ADC with Computation (ADC2) automating Capacitive Voltage Divider (CVD) techniques for advanced touch sensing, averaging, filtering, oversampling, and threshold comparison.

Improved Peripheral Performance

The Direct Memory Access (DMA) Controller eliminates the need for CPU involvement in data transfers between all memory spaces and peripherals, thereby reducing the number of interrupts and improving peripheral performance.

Faster Interrupt Response Times

The Vectored Interrupt (VI) reduces response time by providing hardware ensured 

Enhanced System Features

Memory Access Partition (MAP) supports customers in data protection and bootloader applications. Device Information Area (DIA) is a dedicated memory space for factory programmed device ID and peripheral calibration values. Additionally, the MCUs have improved serial communications, including UART with support for Asynchronous, DMX, DALI and LIN protocols along with higher-speed, standalone I2C and SPI serial communication interfaces.

Key Attributes

  • 64MHz Internal Oscillator
  • Up to 128KB Flash Program Memory
  • Up to 1KB Data EEPROM
  • Up to 8K of SRAM
  • Vectored Interrupt Capability
  • Direct Access Memory (DMA) Controllers
  • 12-bit ADC with Computation (ADC2), up to 43 channels
  • Memory Access Partition (MAP)
  • Device Information Area (DIA)
  • Windowed Watch Dog Timer (WWDT)
  • Up to three Complementary Waveform Generator (CWG)
  • Four Configurable Logic Cell (CLC)
  • Peripheral Pin Select (PPS)
  • Two Comparators
  • Zero Cross Detect (ZCD)
  • On-chip Temperature Indicator
  • Data Signal Modulator (DSM)
  • 5-bit DAC
  • Capacitive Voltage Divider (CVD)
  • Up to four 10-bit PWMs
  • Communication: UART, SPI, and I2C
  • Available in 28-, 40- and 48-pins

Featured Documents

Analog to Digital Converter with Computation (ADC2)
The Analog to Digital Converter with Computation (ADC2) helps accelerate common math tasks normally done in software by offering modes like averaging, low-pass filter, oversampling and threshold comparison.
Zero Cross Detect (ZCD)
The Zero Cross Detect (ZCD) module can monitor AC line voltage, and indicate zero crossing activity. This information is made directly available to on-board Waveform Generation peripherals for use in TRIAC control applications, greatly reducing both CPU demand and BOM cost.
10-bit PWM
The 10-bit PWM provides edge-aligned output, which can be used with the Complementary Waveform Generator.
Complementary Waveform Generator (CWG)
Complementary Waveform Generator (CWG) provides a complementary waveform with rising and falling edge dead band control, enabling high efficiency synchronous switching, with no processor overhead. The CWG also incorporates auto shutdown, auto restart, and can interface directly with other peripherals / external inputs.
Numerically Controlled Oscillator (NCO)
Numerically Controlled Oscillator (NCO) is a precision linear frequency generator with fine step resolution. It provides high-resolution oscillator capabilities to control applications such as lighting ballast, radio and tone generator.
Data Signal Modulator (DSM)

Data Signal Modulator (DSM) offers smooth signal switching. When paired with 16-bit PWM, LED dimming engine functionality is created.

Hardware Limit Timer (HLT)
The Hardware Limit Timer (HLT) can detect faults in motors, power supplies, and other external devices. It can automatically notify the system to make provisions to shut down and/or safely restart.
24-bit Signal Measurement Timer (SMT)
The 24-bit Signal Measurement Timer (SMT) performs high-resolution measurements of any digital signal in hardware, resulting in near zero latency and high performance when decoding custom communications protocols or signaling.
Configurable Logic Cell (CLC)
The Configurable Logic Cell (CLC) offers hardware-based combinational and sequential logic functions to simplify and accelerate many common tasks. The CLC can also be used as “glue” logic between peripherals, eliminating the need for CPU intervention during steady-state activity in complex control loops.
CRC/SCAN module and the Windowed Watchdog Timer (WWDT)
The CRC/SCAN module and the Windowed Watchdog Timer (WWDT) work in tandem to provide engineers with the tools necessary to incorporate functional safety into their application. By ensuring the integrity of the program FLASH contents, PIC18F "K42" devices support the implementation of safety standards such as Class B and UL 1998.
Peripheral Pin Select (PPS)
Peripheral Pin Select (PPS) provides ultimate flexibility when routing digital signals to device pins. With PPS, any digital peripheral can be connected to any I/O pin on-the-fly for a customized layout. This allows users to maintain layout compatibility with older PIC® MCUs, even as new features are implemented.
Direct Memory Access (DMA)
Direct Memory Access (DMA) is used to move data among Flash, EEPROM, RAM and peripherals without intervention from the CPU and in the background of CPU operation.
Advanced Memory Features
Memory Access Partition (MAP) supports customers in data protection and bootloader applications. Device Information Area (DIA) is a dedicated memory space for factory programmed device ID and peripheral calibration values.
Power Conserving Functionality
IDLE and DOZE low-power modes allow applications to optimize device performance and power consumption. The Peripheral Module Disable (PMD)allows unused peripherals to be turned off individually, further reducing power consumption. PIC18F "K42" devices feature the industry leading eXtreme Lower Power (XLP) technology.