Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

PIC16LCR6XT Datasheet(PDF) 118 Page - Microchip Technology

Part # PIC16LCR6XT
Description  8-Bit CMOS Microcontrollers
PDF  334 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC16LCR6XT Datasheet(HTML) 118 Page - Microchip Technology

Back Button PIC16LCR6XT Datasheet HTML 114Page - Microchip Technology PIC16LCR6XT Datasheet HTML 115Page - Microchip Technology PIC16LCR6XT Datasheet HTML 116Page - Microchip Technology PIC16LCR6XT Datasheet HTML 117Page - Microchip Technology PIC16LCR6XT Datasheet HTML 118Page - Microchip Technology PIC16LCR6XT Datasheet HTML 119Page - Microchip Technology PIC16LCR6XT Datasheet HTML 120Page - Microchip Technology PIC16LCR6XT Datasheet HTML 121Page - Microchip Technology PIC16LCR6XT Datasheet HTML 122Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 118 / 334 page
background image
PIC16C6X
DS30234E-page 118
 1997-2013 Microchip Technology Inc.
12.3.2
USART SYNCHRONOUS MASTER
RECEPTION
Once Synchronous Mode is selected, reception is
enabled by setting either enable bit SREN (RCSTA<5>)
bit or enable bit CREN (RCSTA<4>). Data is sampled
on the DT pin on the falling edge of the clock. If enable
bit SREN is set, then only a single word is received. If
enable bit CREN is set, the reception is continuous until
bit CREN is cleared. If both the bits are set then bit
CREN takes precedence. After clocking the last bit, the
received data in the Receive Shift Register (RSR) is
transferred to the RCREG register (if it is empty). When
the transfer is complete, interrupt bit RCIF (PIR1<5>) is
set. The actual interrupt can be enabled/disabled by
setting/clearing enable bit RCIE (PIE1<5>). Flag bit
RCIF is a read only bit which is reset by the hardware.
In this case, it is reset when the RCREG register has
been read and is empty. The RCREG is a double buff-
ered register, i.e., it is a two deep FIFO. It is possible for
two bytes of data to be received and transferred to the
RCREG FIFO and a third byte to begin shifting into the
RSR register. On the clocking of the last bit of the third
byte, if the RCREG register is still full, then overrun
error bit, OERR (RCSTA<1>) is set. The word in the
RSR register will be lost. The RCREG register can be
read twice to retrieve the two bytes in the FIFO. Over-
run error bit OERR has to be cleared in software (by
clearing bit CREN). If bit OERR is set, transfers from
the RSR to the RCREG are inhibited, so it is essential
to clear bit OERR if it is set. The 9th receive bit is buff-
ered the same way as the receive data. Reading the
RCREG register will load bit RX9D with a new value.
Therefore it is essential for the user to read the RCSTA
register before reading the RCREG register in order not
to lose the old RX9D bit information.
Steps to follow when setting up Synchronous Master
Reception:
1.
Initialize the SPBRG register for the appropriate
baud rate (Section 12.1).
2.
Enable the synchronous master serial port by
setting bits SYNC, SPEN, and CSRC.
3.
Ensure bits CREN and SREN are clear.
4.
If interrupts are desired, then set enable bit
RCIE.
5.
If 9-bit reception is desired, then set bit RX9.
6.
If a single reception is required, set enable bit
SREN. For continuous reception set enable bit
CREN.
7.
Flag bit RCIF will be set when reception is com-
plete and an interrupt will be generated if enable
bit RCIE was set.
8.
Read the RCSTA register to get the ninth bit (if
enabled) and determine if any error occurred
during reception.
9.
Read the 8-bit received data by reading the
RCREG register.
10. If any error occurred, clear the error by clearing
enable bit CREN.
TABLE 12-9:
REGISTERS ASSOCIATED WITH SYNCHRONOUS MASTER RECEPTION
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Value on
POR,
BOR
Value on
all other
Resets
0Ch
PIR1
PSPIF(1)
(2)
RCIF
TXIF
SSPIF
CCP1IF
TMR2IF
TMR1IF
0000 0000
0000 0000
18h
RCSTA
SPEN
RX9
SREN
CREN
—
FERR
OERR
RX9D
0000 -00x
0000 -00x
1Ah
RCREG
USART Receive Register
0000 0000
0000 0000
8Ch
PIE1
PSPIE(1)
(2)
RCIE
TXIE
SSPIE
CCP1IE
TMR2IE
TMR1IE
0000 0000
0000 0000
98h
TXSTA
CSRC
TX9
TXEN
SYNC
—
BRGH
TRMT
TX9D
0000 -010
0000 -010
99h
SPBRG
Baud Rate Generator Register
0000 0000
0000 0000
Legend: x = unknown, - = unimplemented locations read as '0'. Shaded cells are not used for Synchronous Master Reception.
Note 1:
PSPIF and PSPIE are reserved on the PIC16C63/R63/66, always maintain these bits clear.
2:
PIR1<6> and PIE1<6> are reserved, always maintain these bits clear.



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


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
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