Docsity

Datashet del PIC en específico, Tesis de Ingeniería electrónica

Toggle sidebar
bg1
2015-2020 Microchip Technology Inc. DS40001802H-page 1
PIC16(L)F18855/75
Description
PIC16(L)F18855/75 microcontrollers feature Analog, Core Independent Peripherals and Communication Peripherals,
combined with eXtreme Low-Power (XLP) technology for a wide range of general purpose and low-power applications.
The family will feature the CRC/SCAN, Hardware Limit Timer (HLT) and Windowed Watchdog Timer (WWDT) to support
customers looking to add safety to their application. Additionally, this family includes up to 14 KB of Flash memory, along
with a 10-bit ADC with Computation (ADC2) extensions for automated signal analysis to reduce the complexity of the
application.
Core Features
• C Compiler Optimized RISC Architecture
• Only 49 Instructions
• Operating Speed:
- DC – 32 MHz clock input
- 125 ns minimum instruction cycle
• Interrupt Capability
• 16-Level Deep Hardware Stack
• Three 8-Bit Timers (TMR2/4/6) with Hardware
Limit Timer (HLT) Extensions
• Four 16-Bit Timers (TMR0/1/3/5)
• Low-Current Power-on Reset (POR)
• Configurable Power-up Timer (PWRTE)
• Brown-out Reset (BOR) with Fast Recovery
• Low-Power BOR (LPBOR) Option
• Windowed Watchdog Timer (WWDT):
- Variable prescaler selection
- Variable window size selection
- All sources configurable in hardware or
software
• Programmable Code Protection
Memory
• Up to 14 KB Flash Program Memory
• Up to 1 KB Data SRAM
• 256B of EEPROM
• Direct, Indirect and Relative Addressing modes
Operating Characteristics
• Operating Voltage Range:
- 1.8V to 3.6V (PIC16LF18855/75)
- 2.3V to 5.5V (PIC16F18855/75)
• Temperature Range:
- Industrial: -40°C to 85°C
- Extended: -40°C to 125°C
Power-Saving Functionality
• DOZE mode: Ability to run the CPU core slower
than the system clock
• IDLE mode: Ability to halt CPU core while internal
peripherals continue operating
• Sleep mode: Lowest Power Consumption
• Peripheral Module Disable (PMD):
- Ability to disable hardware module to
minimize power consumption of unused
peripherals
eXtreme Low-Power (XLP) Features
• Sleep mode: 50 nA @ 1.8V, typical
• Watchdog Timer: 500 nA @ 1.8V, typical
• Secondary Oscillator: 500 nA @ 32 kHz
• Operating Current:
-8 A @ 32 kHz, 1.8V, typical
-32 A/MHz @ 1.8V, typical
Digital Peripherals
• Four Configurable Logic Cells (CLC):
- Integrated combinational and sequential logic
• Three Complementary Waveform Generators
(CWG):
- Rising and falling edge dead-band control
- Full-bridge, half-bridge, 1-channel drive
- Multiple signal sources
• Five Capture/Compare/PWM (CCP) module:
- 16-bit resolution for Capture/Compare modes
- 10-bit resolution for PWM mode
• 10-bit PWM:
- Two 10-bit PWMs
• Numerically Controlled Oscillator (NCO):
- Generates true linear frequency control and
increased frequency resolution
- Input Clock: 0 Hz < FNCO < 32 MHz
- Resolution: FNCO/220
• Two Signal Measurement Timers (SMT):
- 24-bit Signal Measurement Timer
- Up to 12 different Acquisition modes
Full-Featured 28/40/44-Pin Microcontrollers
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Vista previa parcial del texto

¡Descarga Datashet del PIC en específico y más Tesis en PDF de Ingeniería electrónica solo en Docsity!

Description

PIC16(L)F18855/75 microcontrollers feature Analog, Core Independent Peripherals and Communication Peripherals,

combined with eXtreme Low-Power (XLP) technology for a wide range of general purpose and low-power applications.

The family will feature the CRC/SCAN, Hardware Limit Timer (HLT) and Windowed Watchdog Timer (WWDT) to support

customers looking to add safety to their application. Additionally, this family includes up to 14 KB of Flash memory, along

with a 10-bit ADC with Computation (ADC

) extensions for automated signal analysis to reduce the complexity of the

application.

Core Features

  • C Compiler Optimized RISC Architecture
  • Only 49 Instructions
  • Operating Speed:
    • DC – 32 MHz clock input
    • 125 ns minimum instruction cycle
  • Interrupt Capability
  • 16-Level Deep Hardware Stack
  • Three 8-Bit Timers (TMR2/4/6) with Hardware

Limit Timer (HLT) Extensions

  • Four 16-Bit Timers (TMR0/1/3/5)
  • Low-Current Power-on Reset (POR)
  • Configurable Power-up Timer (PWRTE)
  • Brown-out Reset (BOR) with Fast Recovery
  • Low-Power BOR (LPBOR) Option
  • Windowed Watchdog Timer (WWDT):
    • Variable prescaler selection
    • Variable window size selection
    • All sources configurable in hardware or

software

  • Programmable Code Protection

Memory

  • Up to 14 KB Flash Program Memory
  • Up to 1 KB Data SRAM
  • 256B of EEPROM
  • Direct, Indirect and Relative Addressing modes

Operating Characteristics

  • Operating Voltage Range:
    • 1.8V to 3.6V (PIC16LF18855/75)
    • 2.3V to 5.5V (PIC16F18855/75)
  • Temperature Range:
    • Industrial: -40°C to 85°C
    • Extended: -40°C to 125°C

Power-Saving Functionality

  • DOZE mode: Ability to run the CPU core slower

than the system clock

  • IDLE mode: Ability to halt CPU core while internal

peripherals continue operating

  • Sleep mode: Lowest Power Consumption
  • Peripheral Module Disable (PMD):
    • Ability to disable hardware module to

minimize power consumption of unused

peripherals

eXtreme Low-Power (XLP) Features

  • Sleep mode: 50 nA @ 1.8V, typical
  • Watchdog Timer: 500 nA @ 1.8V, typical
  • Secondary Oscillator: 500 nA @ 32 kHz
  • Operating Current:
    • 8 A @ 32 kHz, 1.8V, typical
    • 32 A/MHz @ 1.8V, typical

Digital Peripherals

  • Four Configurable Logic Cells (CLC):
    • Integrated combinational and sequential logic
  • Three Complementary Waveform Generators

(CWG):

  • Rising and falling edge dead-band control
  • Full-bridge, half-bridge, 1-channel drive
  • Multiple signal sources
  • Five Capture/Compare/PWM (CCP) module:
  • 16-bit resolution for Capture/Compare modes
  • 10-bit resolution for PWM mode
  • 10-bit PWM:
  • Two 10-bit PWMs
  • Numerically Controlled Oscillator (NCO):
  • Generates true linear frequency control and

increased frequency resolution

  • Input Clock: 0 Hz < F (^) NCO < 32 MHz
  • Resolution: FNCO /
  • Two Signal Measurement Timers (SMT):
    • 24-bit Signal Measurement Timer
    • Up to 12 different Acquisition modes

Full-Featured 28/40/44-Pin Microcontrollers

Digital Peripherals (Cont.)

  • Cyclical Redundancy Check (CRC/SCAN):
    • 16-bit CRC
    • Scans memory for NVM integrity
  • Communication:
    • EUSART, RS-232, RS-485, LIN compatible
    • Two SPI
    • Two I

C, SMBus, PMBus™ compatible

  • Up to 36 I/O Pins:
    • Individually programmable pull-ups
    • Slew rate control
    • Interrupt-on-change with edge-select
    • Input level selection control (ST or TTL)
    • Digital open-drain enable
    • Current mode enable
  • Peripheral Pin Select (PPS):
    • Enables pin mapping of digital I/O
  • Data Signal Modulator (DSM)
    • Modulates a carrier signal with digital data to

create custom carrier synchronized output

waveforms

Analog Peripherals

  • Analog-to-Digital Converter with Computation

(ADC

  • 10-bit with up to 35 external channels
  • Automated post-processing
  • Automates math functions on input signals:

averaging, filter calculations, oversampling

and threshold comparison

  • Operates in Sleep
  • Two Comparators (COMP):
  • Fixed Voltage Reference at (non) inverting

input(s)

  • Comparator outputs externally accessible
  • 5-Bit Digital-to-Analog Converter (DAC):
  • 5-bit resolution, rail-to-rail
  • Positive Reference Selection
  • Unbuffered I/O pin output
  • Internal connections to ADCs and

comparators

  • Voltage Reference:
    • Fixed Voltage Reference with 1.024V, 2.048V

and 4.096V output levels

Flexible Oscillator Structure

  • High-Precision Internal Oscillator:
    • Software selectable frequency range up to 32

MHz, ±1% typical

  • x2/x4 PLL with Internal and External Sources
  • Low-Power Internal 32 kHz Oscillator

(LFINTOSC)

  • External 32 kHz Crystal Oscillator (SOSC)
  • External Oscillator Block with:
    • Three crystal/resonator modes up to 20 MHz
    • Three external clock modes up to 20 MHz
  • Fail-Safe Clock Monitor:
    • Allows for safe shutdown if peripheral clock

stops

  • Oscillator Start-up Timer (OST)
    • Ensures stability of crystal oscillator

resources

PIN DIAGRAMS

TABLE 1: PACKAGES

Packages (S)PDIP SOIC SSOP

QFN

(6x6)

UQFN

(4x4)

TQFP

QFN

(8x8)

UQFN

(5x5)

VQFN

(5x5)

PIC16(L)F18855     

PIC16(L)F18875     

Note: Pin details are subject to change.

Note 1: See Table 2 for location of all peripheral functions.

2: All V DD and all VSS pins must be connected at the circuit board level. Allowing one or more V SS or V DD pins

to float may result in degraded electrical performance or non-functionality.

PIC16(L)F

V PP /MCLR/RE

RA

RA

RA

RA

RA

RA

RB

RB

RB

RB

RB

RB

RB

V DD

V SS

V SS^21

RA

RA

RC

RC

RC

RC

RC

RC

RC

RC

RB

28-pin SPDIP, SOIC, SSOP

Note 1: See Table 2 for location of all peripheral functions.

2: All V DD and all VSS pins must be connected at the circuit board level. Allowing one or more V SS or V DD pins to

float may result in degraded electrical performance or non-functionality.

3: The bottom pad of the QFN/UQFN package should be connected to V SS at the circuit board level.

RC

RB7RB6RB5RB

RB

VDD

VSS

RC

RC4RC5RC

RE3/MCLR/V

PP

RA1RA

RA

RA

RA

RA

V SS

RA

RA

RC1RC2RC

RB

RB

RB

PIC16(L)F

28-pin QFN (6x6), UQFN (4x4)

Note 1: See Table 3 for location of all peripheral function.

2: All VDD^ and all V^ SS^ pins must be connected at the circuit board level. Allowing one or more V^ SS^ or V^ DD^ pins to

float may result in degraded electrical performance or non-functionality.

PIC16(L)F

V PP /MCLR/RE

RA

RA

RA

RA

RA

RA

RE

RE

RE

RB6/ICSPCLK

RB

RB

RB

V DD

V SS

RD

V DD

VSS

RA

RA

RC

RC

RC

RC

RD

RD

RC

RC

RD

RD

RC

RC

RD

RD

RD

1 RB7/ICSPDAT

RB

RB

RB

40-pin PDIP

Note 1: See Table 3 for location of all peripheral functions.

2: All VDD and all VSS pins must be connected at the circuit board level. Allowing one or more V SS or V DD pins to

float may result in degraded electrical performance or non-functionality.

PIC16(L)F

RC6RC5RC4RD3RD2RD1RD0RC3RC2RC

RC

RA

AN0/RA

V

PP

/MCLR/RE

RB

ICSPCLK/RB6ICSPDAT/RB

RB4RB

NC

RA2RA

RC

RD

RD

RD

RD

V SS

V DD

RB

RB

RB

RA

RA

V SS

NC

V DD

RE

RE

RE

RA

RA

NC

NC

44-pin TQFP (10x10)

Note 1: See Table 3 for location of all peripheral functions.

2: All VDD and all VSS pins must be connected at the circuit board level. Allowing one or more V SS or V DD pins to

float may result in degraded electrical performance or non-functionality.

3: The bottom pad of the QFN/UQFN package should be connected to VSS at the circuit board level.

RA
V

PP

/MCLR/RE
RB
ICSPCLK/RB6ICSPDAT/RB
NCRB4RB
RC6RC5RC4RD3RD2RD1RD0RC3RC2RC1RC
RA
RA
NC
V SS
NC
V DD
RE
RE
RE
RA
RA
RC
RD
RD
RD
RD
V SS
VDD
NC
RB
RB
RB
PIC16(L)F
RA1RA2 RA

44-pin QFN (8x8)

PIN ALLOCATION TABLESTABLE 2:

28-PIN ALLOCATION TABLE (PIC16(L)F18855)

I/O

28-Pin SPDIP/SOIC/SSOP

28-Pin (U)QFN

ADC

Voltage Reference

DAC

Comparators

Zero-Cross Detect

C) 2 MSSP (SPI/I
EUSART
DSM

Timers/SMT

CCP and PWM

CWG
CLC
NCO

Clock Reference (CLKR)

Interrupt-on-Change

Basic

RA
ANA
C1IN0-C2IN0-
CLCIN

(1)

IOCA
RA
ANA
C1IN1-C2IN1-
CLCIN

(1)

IOCA
RA
ANA
V

REF

-^
DAC1OUT
C1IN0+C2IN0+
IOCA
RA
ANA
V

REF

C1IN1+
MDCARL

(1)

IOCA
RA
ANA
MDCARH

(1)

T0CKI

(1)

CCP

(1)

IOCA
RA
ANA
SS

(1)

MDSRC

(1)

IOCA
RA
ANA
IOCA
OSC
CLKOUT
RA
ANA
IOCA
OSC1CLKIN
RB
ANB
C2IN1+
ZCD
SS

(1)

CCP

(1)

CWG1IN

(1)

INT

(1)

IOCB

RB
ANB
C1IN3-C2IN3-
SCL

(3,4)

SCK

(1)

CWG2IN

(1)

IOCB
RB
ANB
SDA

(3,4)

SDI

(1)

CWG3IN

(1)

IOCB
RB
ANB
C1IN2-C2IN2-
IOCB
RB
ANB
ADCACT

(1)

T5G

(1)

SMTWIN

(1)

IOCB

Note

This is a PPS remappable input signal. The input function may be moved from the default location shown to one of several other PORTX pins. Refer to Table 13-1 for details on which port pins may beused for this signal.

All output signals shown in this row are PPS remappable. These signals may be mapped to output onto one of several PORTX pin options as described in Table 13-3.

This is a bidirectional signal. For normal module operation, the firmware should map this signal to the same pin in both the PPS input and PPS output registers.

These pins are configured for I

2 C logic levels.; The SCLx/SDAx signals may be assigned to any of the RB1/RB2/RC3/RC4 pins. PPS assignments to the other pins (e.g., RA5) will operate, but input

logic levels will be standard TTL/ST, as selected by the INLVL register, instead of the I

2 C specific or SMbus input buffer thresholds.

OUT

(2)

ADGRDAADGRDB
C1OUTC2OUT
SDO1SCK1SDO2SCK
TX/CK

(3) DT

(3)

DSM
TMR
CCP1CCP2CCP3CCP4CCP
PWM6OUTPWM7OUT
CWG1ACWG1BCWG1CCWG1DCWG2ACWG2BCWG2CCWG2DCWG3ACWG3BCWG3CCWG3D
CLC1OUTCLC2OUTCLC3OUTCLC4OUT
NCO
CLKR

TABLE 2:

28-PIN ALLOCATION TABLE (PIC16(L)F18855) (CONTINUED)

I/O

28-Pin SPDIP/SOIC/SSOP

28-Pin (U)QFN

ADC

Voltage Reference

DAC

Comparators

Zero-Cross Detect

C) 2 MSSP (SPI/I
EUSART
DSM

Timers/SMT

CCP and PWM

CWG
CLC
NCO

Clock Reference (CLKR)

Interrupt-on-Change

Basic

Note

This is a PPS remappable input signal. The input function may be moved from the default location shown to one of several other PORTX pins. Refer to Table 13-1 for details on which port pins may beused for this signal.

All output signals shown in this row are PPS remappable. These signals may be mapped to output onto one of several PORTX pin options as described in Table 13-3.

This is a bidirectional signal. For normal module operation, the firmware should map this signal to the same pin in both the PPS input and PPS output registers.

These pins are configured for I

2 C logic levels.; The SCLx/SDAx signals may be assigned to any of the RB1/RB2/RC3/RC4 pins. PPS assignments to the other pins (e.g., RA5) will operate, but input

logic levels will be standard TTL/ST, as selected by the INLVL register, instead of the I

2 C specific or SMbus input buffer thresholds.

TABLE 3:

40/44-PIN ALLOCATION TABLE (PIC16F18875)

!/O

40-Pin PDIP

40-Pin (U,V)QFN

44-Pin QFN

44-Pin TQFP

ADC

Voltage Reference

DAC

Comparators

Zero-Cross Detect

C) 2 MSSP (SPI/I
EUSART
DSM

Timers/SMT

CCP and PWM

CWG
CLC
NCO

Clock Reference (CLKR)

Interrupt-on-Change

Basic

RA
ANA
C1IN0-C2IN0-
CLCIN

(1)

IOCA
RA
ANA
C1IN1-C2IN1-
CLCIN

(1)

IOCA
RA
ANA
V

REF

-^
DAC1OUT
C1IN0+C2IN0+
IOCA
RA
ANA
V

REF

C1IN1+
MDCARL

(1)

IOCA
RA
ANA
MDCARH

(1)

T0CKI

(1)

CCP

(1)

IOCA
RA
ANA
SS

(1)

MDSRC

(1)

IOCA
RA
ANA
IOCA
OSC
CLKOUT
RA
ANA
IOCA
OSC1CLKIN
RB
ANB
C2IN1+
ZCD
SS

(1)

CCP

(1)

CWG1IN

(1)

INT

(1) IOCB

RB
ANB
C1IN3-C2IN3-
SCL

(3,4)

SCK

(1)

CWG2IN

(1)

IOCB
RB
ANB
SDA

(3,4)

SDI

(1)

CWG3IN

(1)

IOCB
RB
ANB
C1IN2-C2IN2-
IOCB
RB
ANB
ADCACT

(1)

T5G

(1)

SMTWIN

(1)

IOCB
RB
ANB
T1G

(1)

SMTSIG

(1)

CCP3(1)
IOCB
RB
ANB
CLCIN

(1)

IOCB
ICSPCLK
RB
ANB
DAC1OUT
T6IN

(1)

CLCIN

(1)

IOCB
ICSPDAT

Note

This is a PPS remappable input signal. The input function may be moved from the default location shown to one of several other PORTx pins. Refer to Table 13-1 for details on which port pins may beused for this signal.

All output signals shown in this row are PPS remappable. These signals may be mapped to output onto one of several PORTx pin options as described in Table 13-3.

This is a bidirectional signal. For normal module operation, the firmware should map this signal to the same pin in both the PPS input and PPS output registers.

These pins are configured for I

2 C logic levels.; The SCLx/SDAx signals may be assigned to any of the RB1/RB2/RC3/RC4 pins. PPS assignments to the other pins (e.g., RA5) will operate, but input

logic levels will be standard TTL/ST, as selected by the INLVL register, instead of the I

2 C specific or SMbus input buffer thresholds.

RE
IOCE
MCLRV

PP

V

DD

11,^32
V

SS

12,^31
OUT

(2)

ADGRDAADGRDB
C1OUTC2OUT
SDO1SCK1SDO2SCK
TX/CK

(3) DT

(3)

DSM
TMR
CCP1CCP2CCP3CCP4CCP
PWM6OUTPWM7OUT
CWG1ACWG1BCWG1CCWG1DCWG2ACWG2BCWG2CCWG2DCWG3ACWG3BCWG3CCWG3D
CLC1OUTCLC2OUTCLC3OUTCLC4OUT
NCO
CLKR

TABLE 3:

40/44-PIN ALLOCATION TABLE (PIC16F18875) (CONTINUED)

!/O

40-Pin PDIP

40-Pin (U,V)QFN

44-Pin QFN

44-Pin TQFP

ADC

Voltage Reference

DAC

Comparators

Zero-Cross Detect

C) 2 MSSP (SPI/I
EUSART
DSM

Timers/SMT

CCP and PWM

CWG
CLC
NCO

Clock Reference (CLKR)

Interrupt-on-Change

Basic

Note

This is a PPS remappable input signal. The input function may be moved from the default location shown to one of several other PORTx pins. Refer to Table 13-1 for details on which port pins may beused for this signal.

All output signals shown in this row are PPS remappable. These signals may be mapped to output onto one of several PORTx pin options as described in Table 13-3.

This is a bidirectional signal. For normal module operation, the firmware should map this signal to the same pin in both the PPS input and PPS output registers.

These pins are configured for I

2 C logic levels.; The SCLx/SDAx signals may be assigned to any of the RB1/RB2/RC3/RC4 pins. PPS assignments to the other pins (e.g., RA5) will operate, but input

logic levels will be standard TTL/ST, as selected by the INLVL register, instead of the I

2 C specific or SMbus input buffer thresholds.

Table of Contents

  • Pin Diagrams
  • Pin Allocation Tables
  • 1.0 Device Overview
  • 2.0 Enhanced Mid-Range CPU
  • 3.0 Memory Organization
  • 4.0 Device Configuration
  • 5.0 Resets
  • 6.0 Oscillator Module (with Fail-Safe Clock Monitor)
  • 7.0 Interrupts
  • 8.0 Power-Saving Operation Modes
  • 9.0 Windowed Watchdog Timer (WWDT)
  • 10.0 Nonvolatile Memory (NVM) Control
  • 11.0 Cyclic Redundancy Check (CRC) Module
  • 12.0 I/O Ports
  • 13.0 Peripheral Pin Select (PPS) Module
  • 14.0 Peripheral Module Disable
  • 15.0 Interrupt-On-Change
  • 16.0 Fixed Voltage Reference (FVR)
  • 17.0 Temperature Indicator Module
  • 18.0 Comparator Module
  • 19.0 Pulse-Width Modulation (PWM)
  • 20.0 Complementary Waveform Generator (CWG) Module
  • 21.0 Zero-Cross Detection (ZCD) Module
  • 22.0 Configurable Logic Cell (CLC)
  • 23.0 Analog-to-Digital Converter With Computation (ADC2) Module
  • 24.0 Numerically Controlled Oscillator (NCO) Module
  • 25.0 5-Bit Digital-to-Analog Converter (DAC1) Module
  • 26.0 Data Signal Modulator (DSM) Module
  • 27.0 Timer0 Module
  • 28.0 Timer1/3/5 Module with Gate Control
  • 29.0 Timer2/4/6 Module
  • 30.0 Capture/Compare/PWM Modules
  • 31.0 Host Synchronous Serial Port (MSSP) Modules
  • 32.0 Signal Measurement Timer (SMT)
  • 33.0 Enhanced Universal Synchronous Asynchronous Receiver Transmitter (EUSART)
  • 34.0 Reference Clock Output Module
  • 35.0 In-Circuit Serial Programming™ (ICSP™)
  • 36.0 Instruction Set Summary
  • 37.0 Electrical Specifications
  • 38.0 DC and AC Characteristics Graphs and Charts
  • 39.0 Development Support
  • 40.0 Packaging Information
  • Appendix A: Data Sheet Revision History
  • The Microchip Website
  • Customer Change Notification Service
  • Customer Support
  • Product Identification System

1.0 DEVICE OVERVIEW

The PIC16(L)F18855/75 are described within this data

sheet. The PIC16(L)F18855 devices are available in

28-pin SPDIP, SSOP, SOIC, and UQFN packages. The

PIC16(L)F18875 devices are available in 40-pin PDIP

and UQFN and 44-pin TQFP and QFN packages.

Figure 1-1 shows a block diagram of the

PIC16(L)F18855/75 devices. Table 1-2 and Table 1-

show the pinout descriptions.

Reference Table 1-1 for peripherals available per device.

TABLE 1-1: DEVICE PERIPHERAL SUMMARY

Peripheral

PIC16(L)F18855PIC16(L)F

Analog-to-Digital Converter with Computation (ADC 2 ) ● ● Cyclic Redundancy Check (CRC) ● ● Digital-to-Analog Converter (DAC) ● ● Fixed Voltage Reference (FVR) ● ● Enhanced Universal Synchronous/Asynchronous Receiver/ Transmitter (EUSART1)

Digital Signal Modulator (DSM) ● ● Numerically Controlled Oscillator (NCO1) ● ● Temperature Indicator ● ● Zero-Cross Detect (ZCD) ● ● Capture/Compare/PWM (CCP/ECCP) Modules CCP1 ● ● CCP2 ● ● CCP3 ● ● CCP4 ● ● CCP5 ● ● Comparators C1 ● ● C2 ● ● Configurable Logic Cell (CLC) CLC1 ● ● CLC2 ● ● CLC3 ● ● CLC4 ● ● Complementary Waveform Generator (CWG) CWG1 ● ● CWG2 ● ● CWG3 ● ● Host Synchronous Serial Ports MSSP1 ● ● MSSP2 ● ● Pulse-Width Modulator (PWM) PWM6 ● ● PWM7 ● ● Signal Measure Timer (SMT) SMT1 ● ● SMT2 ● ● Timers Timer0 ● ● Timer1 ● ● Timer2 ● ● Timer3 ● ● Timer4 ● ● Timer5 ● ● Timer6 ● ●

1.1 Register and Bit naming

conventions

1.1.1 REGISTER NAMES

When there are multiple instances of the same

peripheral in a device, the peripheral control registers

will be depicted as the concatenation of a peripheral

identifier, peripheral instance, and control identifier.

The control registers section will show just one

instance of all the register names with an ‘x’ in the place

of the peripheral instance number. This naming

convention may also be applied to peripherals when

there is only one instance of that peripheral in the

device to maintain compatibility with other devices in

the family that contain more than one.

1.1.2 BIT NAMES

There are two variants for bit names:

  • Short name: Bit function abbreviation
  • Long name: Peripheral abbreviation + short name

1.1.2.1 Short Bit Names

Short bit names are an abbreviation for the bit function.

For example, some peripherals are enabled with the

EN bit. The bit names shown in the registers are the

short name variant.

Short bit names are useful when accessing bits in C

programs. The general format for accessing bits by the

short name is RegisterName bits. ShortName. For

example, the enable bit, EN, in the COG1CON0 regis-

ter can be set in C programs with the instruction

COG1CON0bits.EN = 1.

Short names are generally not useful in assembly

programs because the same name may be used by

different peripherals in different bit positions. When this

occurs, during the include file generation, all instances

of that short bit name are appended with an underscore

plus the name of the register in which the bit resides to

avoid naming contentions.

1.1.2.2 Long Bit Names

Long bit names are constructed by adding a peripheral

abbreviation prefix to the short name. The prefix is

unique to the peripheral thereby making every long bit

name unique. The long bit name for the COG1 enable

bit is the COG1 prefix, G1, appended with the enable

bit short name, EN, resulting in the unique bit name

G1EN.

Long bit names are useful in both C and assembly pro-

grams. For example, in C the COG1CON0 enable bit

can be set with the G1EN = 1 instruction. In assembly,

this bit can be set with the BSF COG1CON0,G1EN

instruction.

1.1.2.3 Bit Fields

Bit fields are two or more adjacent bits in the same

register. Bit fields adhere only to the short bit naming

convention. For example, the three Least Significant

bits of the COG1CON0 register contain the mode

control bits. The short name for this field is MD. There

is no long bit name variant. Bit field access is only

possible in C programs. The following example

demonstrates a C program instruction for setting the

COG1 to the Push-Pull mode:

COG1CON0bits.MD = 0x5;

Individual bits in a bit field can also be accessed with

long and short bit names. Each bit is the field name

appended with the number of the bit position within the

field. For example, the Most Significant mode bit has

the short bit name MD2 and the long bit name is

G1MD2. The following two examples demonstrate

assembly program sequences for setting the COG1 to

Push-Pull mode:

Example 1:

MOVLW ~(1<<G1MD1)

ANDWF COG1CON0,F

MOVLW 1<<G1MD2 | 1<<G1MD

IORWF COG1CON0,F

Example 2:

BSF COG1CON0,G1MD

BCF COG1CON0,G1MD

BSF COG1CON0,G1MD

1.1.3 REGISTER AND BIT NAMING EXCEPTIONS

1.1.3.1 Status, Interrupt, and Mirror Bits

Status, interrupt enables, interrupt flags, and mirror bits

are contained in registers that span more than one

peripheral. In these cases, the bit name shown is

unique so there is no prefix or short name variant.

1.1.3.2 Legacy Peripherals

There are some peripherals that do not strictly adhere

to these naming conventions. Peripherals that have

existed for many years and are present in almost every

device are the exceptions. These exceptions were

necessary to limit the adverse impact of the new

conventions on legacy code. Peripherals that do

adhere to the new convention will include a table in the

registers section indicating the long name prefix for

each peripheral instance. Peripherals that fall into the

exception category will not have this table. These

peripherals include, but are not limited to, the following:

  • EUSART
  • MSSP

TABLE 1-2: PIC16F18855 PINOUT DESCRIPTION

Name Function Input Type Output Type Description

RA0/ANA0/C1IN0-/C2IN0-/CLCIN0 (1) /
IOCA

RA0 TTL/ST CMOS/OD General purpose I/O.

ANA0 AN — ADC Channel A0 input.

C1IN0- AN — Comparator negative input.

C2IN0- AN — Comparator negative input.

CLCIN0 (1)^ TTL/ST — Configurable Logic Cell source input.

IOCA0 TTL/ST — Interrupt-on-change input.

RA1/ANA1/C1IN1-/C2IN1-/CLCIN1 (1) / IOCA

RA1 TTL/ST CMOS/OD General purpose I/O.

ANA1 AN — ADC Channel A1 input.

C1IN1- AN — Comparator negative input.

C2IN1- AN — Comparator negative input.

CLCIN1 (1)^ TTL/ST — Configurable Logic Cell source input.

IOCA1 TTL/ST — Interrupt-on-change input.

RA2/ANA2/C1IN0+/C2IN0+/V REF-/ DAC1OUT1/IOCA

RA2 TTL/ST CMOS/OD General purpose I/O.

ANA2 AN — ADC Channel A2 input.

C1IN0+ AN — Comparator positive input.

C2IN0+ AN — Comparator positive input.

V REF - AN — External ADC and/or DAC negative reference input.

DAC1OUT1 — AN Digital-to-Analog Converter output.

IOCA2 TTL/ST — Interrupt-on-change input.

RA3/ANA3/C1IN1+/V REF +/MDCARL (1) / IOCA

RA3 TTL/ST CMOS/OD General purpose I/O.

ANA3 AN — ADC Channel A3 input.

C1IN1+ AN — Comparator positive input.

V REF + AN — External ADC and/or DAC positive reference input.

MDCARL (1)^ TTL/ST — Modular Carrier input 1.

IOCA3 TTL/ST — Interrupt-on-change input.

RA4/ANA4/MDCARH (1) /T0CKI (1) / CCP5 (1) /IOCA

RA4 TTL/ST CMOS/OD General purpose I/O.

ANA4 AN — ADC Channel A4 input.

MDCARH (1)^ TTL/ST — Modular Carrier input 2.

T0CKI (1)^ TTL/ST — Timer0 clock input.

CCP5 (1)^ TTL/ST CMOS/OD Capture/compare/PWM5 (default input location for capture function). IOCA4 TTL/ST — Interrupt-on-change input.

Legend: AN = Analog input or output CMOS = CMOS compatible input or output OD = Open-Drain TTL = TTL compatible input ST = Schmitt Trigger input with CMOS levels I 2 C = Schmitt Trigger input with I 2 C HV = High Voltage XTAL = Crystal levels Note 1: This is a PPS remappable input signal. The input function may be moved from the default location shown to one of several other PORTx pins. Refer to Table 13-1 for details on which PORT pins may be used for this signal. 2: All output signals shown in this row are PPS remappable. These signals may be mapped to output onto one of several PORTx pin options as described in Table 13-3. 3: This is a bidirectional signal. For normal module operation, the firmware should map this signal to the same pin in both the PPS input and PPS output registers. 4: These pins are configured for I 2 C logic levels. The SCLx/SDAx signals may be assigned to any of the RB1/RB2/RC3/RC4 pins. PPS assignments to the other pins (e.g., RA5) will operate, but input logic levels will be standard TTL/ST, as selected by the INLVL register, instead of the I^2 C specific or SMBus input buffer thresholds.

RA5/ANA5/SS1 (1) /MDSRC (1) /IOCA5 RA5 TTL/ST CMOS/OD General purpose I/O.

ANA5 AN — ADC Channel A5 input.

SS1 (1)^ TTL/ST — MSSP1 SPI client select input.

MDSRC (1)^ TTL/ST — Modulator Source input.

IOCA5 TTL/ST — Interrupt-on-change input.

RA6/ANA6/OSC2/CLKOUT/IOCA6 RA6 TTL/ST CMOS/OD General purpose I/O.

ANA6 AN — ADC Channel A6 input.

OSC2 — XTAL External Crystal/Resonator (LP, XT, HS modes) driver output.

CLKOUT — CMOS/OD F OSC/4 digital output (in non-crystal/resonator modes).

IOCA6 TTL/ST — Interrupt-on-change input.

RA7/ANA7/OSC1/CLKIN/IOCA7 RA7 TTL/ST CMOS/OD General purpose I/O.

ANA7 AN — ADC Channel A7 input.

OSC1 XTAL — External Crystal/Resonator (LP, XT, HS modes) driver input.

CLKIN TTL/ST — External digital clock input.

IOCA7 TTL/ST — Interrupt-on-change input.

RB0/ANB0/C2IN1+/ZCD/SS2 (1) / CCP4 (1) /CWG1IN (1) /INT (1) /IOCB

RB0 TTL/ST CMOS/OD General purpose I/O.

ANB0 AN — ADC Channel B0 input.

C2IN1+ AN — Comparator positive input.

ZCD AN AN Zero-cross detect input pin.

SS2 (1)^ TTL/ST — MSSP2 SPI client select input.

CCP4 (1)^ TTL/ST CMOS/OD Capture/compare/PWM4 (default input location for capture function). CWG1IN (1)^ TTL/ST — Complementary Waveform Generator 1 input.

INT (1)^ TTL/ST — External interrupt request input.

IOCB0 TTL/ST — Interrupt-on-change input.

RB1/ANB1/C1IN3-/C2IN3-/SCL2 (3,4) / SCK2 (1) /CWG2IN (1) /IOCB

RB1 TTL/ST CMOS/OD General purpose I/O.

ANB1 AN — ADC Channel B1 input.

C1IN3- AN — Comparator negative input.

C2IN3- AN — Comparator negative input.

SCL2 (3,4)^ I^2 C/ SMBus

OD MSSP2 I 2 C clock input/output.

SCK2 (1)^ TTL/ST CMOS/OD MSSP2 SPI serial clock (default input location, SCK2 is a PPS remappable input and output). CWG2IN (1)^ TTL/ST — Complementary Waveform Generator 2 input.

IOCB1 TTL/ST — Interrupt-on-change input.

TABLE 1-2: PIC16F18855 PINOUT DESCRIPTION (CONTINUED)

Name Function Input Type Output Type Description

Legend: AN = Analog input or output CMOS = CMOS compatible input or output OD = Open-Drain TTL = TTL compatible input ST = Schmitt Trigger input with CMOS levels I 2 C = Schmitt Trigger input with I 2 C HV = High Voltage XTAL = Crystal levels Note 1: This is a PPS remappable input signal. The input function may be moved from the default location shown to one of several other PORTx pins. Refer to Table 13-1 for details on which PORT pins may be used for this signal. 2: All output signals shown in this row are PPS remappable. These signals may be mapped to output onto one of several PORTx pin options as described in Table 13-3. 3: This is a bidirectional signal. For normal module operation, the firmware should map this signal to the same pin in both the PPS input and PPS output registers. 4: These pins are configured for I 2 C logic levels. The SCLx/SDAx signals may be assigned to any of the RB1/RB2/RC3/RC4 pins. PPS assignments to the other pins (e.g., RA5) will operate, but input logic levels will be standard TTL/ST, as selected by the INLVL register, instead of the I^2 C specific or SMBus input buffer thresholds.