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

X  

DVR 数据表(PDF) 202 Page - Microchip Technology

部件名 DVR
功能描述  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

DVR 数据表(HTML) 202 Page - Microchip Technology

Back Button DVR Datasheet HTML 198Page - Microchip Technology DVR Datasheet HTML 199Page - Microchip Technology DVR Datasheet HTML 200Page - Microchip Technology DVR Datasheet HTML 201Page - Microchip Technology DVR Datasheet HTML 202Page - Microchip Technology DVR Datasheet HTML 203Page - Microchip Technology DVR Datasheet HTML 204Page - Microchip Technology DVR Datasheet HTML 205Page - Microchip Technology DVR Datasheet HTML 206Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 202 / 416 page
background image
PIC24FJ256GA705 FAMILY
DS30010118D-page 202
 2016-2018 Microchip Technology Inc.
17.1
Master Mode Operation
Perform the following steps to set up the SPIx module
for Master mode operation:
1.
Disable the SPIx interrupts in the respective
IECx register.
2.
Stop and reset the SPIx module by clearing the
SPIEN bit.
3.
Clear the receive buffer.
4.
Clear the ENHBUF bit (SPIxCON1L<0>) if using
Standard Buffer mode or set the bit if using
Enhanced Buffer mode.
5.
If SPIx interrupts are not going to be used, skip
this step. Otherwise, the following additional
steps are performed:
a)
Clear the SPIx interrupt flags/events in the
respective IFSx register.
b)
Write the SPIx interrupt priority and
sub-priority bits in the respective IPCx
register.
c)
Set the SPIx interrupt enable bits in the
respective IECx register.
6.
Write the Baud Rate register, SPIxBRGL.
7.
Clear the SPIROV bit (SPIxSTATL<6>).
8.
Write the desired settings to the SPIxCON1L
register with MSTEN (SPIxCON1L<5>) = 1.
9.
Enable SPI operation by setting the SPIEN bit
(SPIxCON1L<15>).
10. Write the data to be transmitted to the
SPIxBUFL and SPIxBUFH registers. Transmis-
sion (and reception) will start as soon as data is
written to the SPIxBUFL/H registers.
17.2
Slave Mode Operation
The following steps are used to set up the SPIx module
for the Slave mode of operation:
1.
If using interrupts, disable the SPIx interrupts in
the respective IECx register.
2.
Stop and reset the SPIx module by clearing the
SPIEN bit.
3.
Clear the receive buffer.
4.
Clear the ENHBUF bit (SPIxCON1L<0>) if using
Standard Buffer mode or set the bit if using
Enhanced Buffer mode.
5.
If using interrupts, the following additional steps
are performed:
a)
Clear the SPIx interrupt flags/events in the
respective IFSx register.
b)
Write the SPIx interrupt priority and
sub-priority bits in the respective IPCx
register.
c)
Set the SPIx interrupt enable bits in the
respective IECx register.
6.
Clear the SPIROV bit (SPIxSTATL<6>).
7.
Write the desired settings to the SPIxCON1L
register with MSTEN (SPIxCON1L<5>) = 0.
8.
Enable SPI operation by setting the SPIEN bit
(SPIxCON1L<15>).
9.
Transmission (and reception) will start as soon
as the master provides the serial clock.
The following additional features are provided in
Slave mode:
• Slave Select Synchronization:
The SSx pin allows a Synchronous Slave mode. If
the SSEN bit (SPIxCON1L<7>) is set, transmis-
sion and reception are enabled in Slave mode
only if the SSx pin is driven to a low state. The
port output or other peripheral outputs must not
be driven in order to allow the SSx pin to function
as an input. If the SSEN bit is set and the SSx pin
is driven high, the SDOx pin is no longer driven
and will tri-state, even if the module is in the
middle of a transmission. An aborted transmission
will be tried again the next time the SSx pin is
driven low using the data held in the SPIxTXB
register. If the SSEN bit is not set, the SSx pin
does not affect the module operation in Slave
mode.
• SPITBE Status Flag Operation:
The SPITBE bit (SPIxSTATL<3>) has a different
function in the Slave mode of operation. The
following describes the function of SPITBE for
various settings of the Slave mode of operation:
- If SSEN (SPIxCON1L<7>) is cleared, the
SPITBE bit is cleared when SPIxBUF is
loaded by the user code. It is set when the
module transfers SPIxTXB to SPIxTXSR.
This is similar to the SPITBE bit function in
Master mode.
- If SSEN is set, SPITBE is cleared when
SPIxBUF is loaded by the user code. How-
ever, it is set only when the SPIx module
completes data transmission. A transmission
will be aborted when the SSx pin goes high
and may be retried at a later time. So, each
data word is held in SPIxTXB until all bits are
transmitted to the receiver.



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