English
Language : 

PIC16LF1508 Datasheet, PDF (289/384 Pages) Microchip Technology – 20-Pin Flash, 8-Bit Microcontrollers with nanoWatt XLP Technology
PIC16(L)F1508/9
25.1 NCOx OPERATION
The NCOx operates by repeatedly adding a fixed value
to an accumulator. Additions occur at the input clock
rate. The accumulator will overflow with a carry
periodically, which is the raw NCOx output. This
effectively reduces the input clock by the ratio of the
addition value to the maximum accumulator value. See
Equation 25-1.
The NCOx output can be further modified by stretching
the pulse or toggling a flip-flop. The modified NCOx
output is then distributed internally to other peripherals
and optionally output to a pin. The accumulator overflow
also generates an interrupt.
The NCOx period changes in discrete steps to create an
average frequency. This output depends on the ability of
the receiving circuit (i.e., CWG or external resonant
converter circuitry) to average the NCOx output to
reduce uncertainty.
25.1.1 NCOx CLOCK SOURCES
Clock sources available to the NCOx include:
• HFINTOSC
• FOSC
• LC1OUT
• CLKIN pin
The NCOx clock source is selected by configuring the
NxCKS<2:0> bits in the NCOxCLK register.
25.1.2 ACCUMULATOR
The accumulator is a 20-bit register. Read and write
access to the accumulator is available through three
registers:
• NCOxACCL
• NCOxACCH
• NCOxACCU
25.1.3 ADDER
The NCOx Adder is a full adder, which operates
independently from the system clock. The addition of
the previous result and the increment value replaces
the accumulator value on the rising edge of each input
clock.
25.1.4 INCREMENT REGISTERS
The Increment value is stored in two 8-bit registers
making up a 16-bit increment. In order of LSB to MSB
they are:
• NCOxINCL
• NCOxINCH
Both of the registers are readable and writeable. The
Increment registers are double-buffered to allow for
value changes to be made without first disabling the
NCOx module.
The buffer loads are immediate when the module is dis-
abled. Writing to the NCOxINCH register first is neces-
sary because then the buffer is loaded synchronously
with the NCOx operation after the write is executed on
the NCOxINCL register.
Note: The increment buffer registers are not
user-accessible.
EQUATION 25-1:
FOVERFLOW= N-----C----O-------C----l--o----c---k----F----r---e---q---u----e---n-2--c-n--y---------I---n---c---r---e---m----e---n----t----V----a---l--u---e-
n = Accumulator width in bits
 2011 Microchip Technology Inc.
Preliminary
DS41609A-page 289