数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

DVR21 数据表(PDF) 273 Page - Microchip Technology

部件名 DVR21
功能描述  16-Bit General Purpose Microcontrollers with 256-Kbyte Flash and 16-Kbyte RAM in Low Pin Count Packages
PDF  416 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  MICROCHIP [Microchip Technology]
网页  http://www.microchip.com
标志 MICROCHIP - Microchip Technology

DVR21 数据表(HTML) 273 Page - Microchip Technology

Back Button DVR21 Datasheet HTML 269Page - Microchip Technology DVR21 Datasheet HTML 270Page - Microchip Technology DVR21 Datasheet HTML 271Page - Microchip Technology DVR21 Datasheet HTML 272Page - Microchip Technology DVR21 Datasheet HTML 273Page - Microchip Technology DVR21 Datasheet HTML 274Page - Microchip Technology DVR21 Datasheet HTML 275Page - Microchip Technology DVR21 Datasheet HTML 276Page - Microchip Technology DVR21 Datasheet HTML 277Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 273 / 416 page
background image
 2016-2018 Microchip Technology Inc.
DS30010118D-page 273
PIC24FJ256GA705 FAMILY
22.1.3
DATA SHIFT DIRECTION
The LENDIAN bit (CRCCON1<3>) is used to control
the shift direction. By default, the CRC will shift data
through the engine, MSb first. Setting LENDIAN (= 1)
causes the CRC to shift data, LSb first. This setting
allows better integration with various communication
schemes and removes the overhead of reversing the
bit order in software. Note that this only changes the
direction the data is shifted into the engine. The result
of the CRC calculation will still be a normal CRC result,
not a reverse CRC result.
22.1.4
INTERRUPT OPERATION
The module generates an interrupt that is configurable
by the user for either of two conditions.
If CRCISEL is ‘0’, an interrupt is generated when the
VWORD<4:0> bits make a transition from a value of ‘1’
to ‘0’. If CRCISEL is ‘1’, an interrupt will be generated
after the CRC operation finishes and the module sets
the CRCGO bit to ‘0’. Manually setting CRCGO to ‘0’
will not generate an interrupt. Note that when an
interrupt occurs, the CRC calculation would not yet be
complete. The module will still need (PLENx + 1)/2
clock cycles after the interrupt is generated until the
CRC calculation is finished.
22.1.5
TYPICAL OPERATION
To use the module for a typical CRC calculation:
1.
Set the CRCEN bit to enable the module.
2.
Configure the module for desired operation:
a)
Program the desired polynomial using the
CRCXOR registers and PLEN<4:0> bits.
b)
Configure the data width and shift direction
using the DWIDTH<4:0> and LENDIAN bits.
3.
Set the CRCGO bit to start the calculations.
4.
Set the desired CRC non-direct initial value by
writing to the CRCWDAT registers.
5.
Load all data into the FIFO by writing to the
CRCDAT registers as space becomes available
(the CRCFUL bit must be zero before the next
data loading).
6.
Wait until the data FIFO is empty (CRCMPT bit
is set).
7.
Read the result:
If the data width (DWIDTH<4:0> bits) is more
than the polynomial length (PLEN<4:0> bits):
a)
Wait (DWIDTH<4:0> + 1)/2 instruction cycles
to make sure that shifts from the shift buffer
are finished.
b)
Change the data width to the polynomial
length (DWIDTH<4:0> = PLEN<4:0>).
c)
Write one dummy data word to the CRCDAT
registers.
d)
Wait two instruction cycles to move the data
from the FIFO to the shift buffer and
(PLEN<4:0> + 1)/2 instruction cycles to
shift out the result.
Or, if the data width (DWIDTH<4:0> bits) is less than
the polynomial length (PLEN<4:0> bits):
1.
Clear
the
CRC
Interrupt
Selection
bit
(CRCISEL = 0) to get the interrupt when all
shifts are done. Clear the CRC interrupt flag.
Write dummy data in the CRCDAT registers and
wait until the CRC interrupt flag is set.
2.
Read the final CRC result from the CRCWDAT
registers.
3.
Restore the data width (DWIDTH<4:0> bits) for
further calculations (optional). If the data width
(DWIDTH<4:0> bits) is equal to, or less than, the
polynomial length (PLEN<4:0> bits):
a) Clear the CRC Interrupt Selection bit
(CRCISEL = 0) to get the interrupt when all
shifts are done.
b) Suspend
the
calculation
by
setting
CRCGO = 0.
c)
Clear the CRC interrupt flag.
d) Write the dummy data with the total data
length equal to the polynomial length in the
CRCDAT registers.
e) Resume
the
calculation
by
setting
CRCGO = 1.
f)
Wait until the CRC interrupt flag is set.
g)
Read the final CRC result from the
CRCWDAT registers.
There are eight registers used to control programmable
CRC operation:
• CRCCON1
• CRCCON2
• CRCXORL
• CRCXORH
• CRCDATL
• CRCDATH
• CRCWDATL
• CRCWDATH
The CRCCON1 and CRCCON2 registers (Register 22-1
and Register 22-2) control the operation of the module
and configure the various settings.
The
CRCXOR
registers
(Register 22-3
and
Register 22-4) select the polynomial terms to be used
in the CRC equation. The CRCDAT and CRCWDAT
registers are each register pairs that serve as buffers
for the double-word input data, and CRC processed
output, respectively.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com