English
Language : 

PIC10F320 Datasheet, PDF (131/210 Pages) Microchip Technology – 6/8-Pin, High-Performance, Flash Microcontrollers
PIC10(L)F320/322
20.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 20-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 output creates an instantaneous frequency,
which may cause uncertainty. This output depends on
the ability of the receiving circuit (i.e., CWG or external
resonant converter circuitry) to average the
instantaneous frequency to reduce uncertainty.
20.1.1 NCOx CLOCK SOURCES
Clock sources available to the NCOx include:
• HFINTOSC
• FOSC
• LC1OUT
• NCO1CLK pin
The NCOx clock source is selected by configuring the
NxCKS<1:0> bits in the NCOxCLK register.
20.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
20.1.3 ADDER
The NCOx Adder is a full adder, which operates
asynchronously to the clock source selected. The
addition of the previous result and the increment value
replaces the accumulator value on the rising edge of
each input clock.
20.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 MS register first is necessary
because then the buffer is loaded synchronously with
the NCOx operation after the write is executed on the
lower increment register.
Note: The increment buffer registers are not user-
accessible.
EQUATION 20-1:
FOVERFLOW=
N-----C----O-------C----l--o----c---k----F----r---e---q----u---e---n---c---y---------I---n---c---r---e---m----e---n----t----V----a---l--u---e--
2n
n = Accumulator width in bits
 2011 Microchip Technology Inc.
Preliminary
DS41585A-page 131