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

X  

PIC16LC771 数据表(PDF) 89 Page - Microchip Technology

部件名 PIC16LC771
功能描述  18/20-Pin, 8-Bit CMOS Microcontrollers with 10/12-Bit A/D
PDF  224 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  MICROCHIP [Microchip Technology]
网页  http://www.microchip.com
标志 MICROCHIP - Microchip Technology

PIC16LC771 数据表(HTML) 89 Page - Microchip Technology

Back Button PIC16LC771 Datasheet HTML 85Page - Microchip Technology PIC16LC771 Datasheet HTML 86Page - Microchip Technology PIC16LC771 Datasheet HTML 87Page - Microchip Technology PIC16LC771 Datasheet HTML 88Page - Microchip Technology PIC16LC771 Datasheet HTML 89Page - Microchip Technology PIC16LC771 Datasheet HTML 90Page - Microchip Technology PIC16LC771 Datasheet HTML 91Page - Microchip Technology PIC16LC771 Datasheet HTML 92Page - Microchip Technology PIC16LC771 Datasheet HTML 93Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 89 / 224 page
background image
 1999-2013 Microchip Technology Inc.
Advance Information
DS41120C-page 89
PIC16C717/770/771
9.2.13
I2C MASTER MODE RECEPTION
In Master-receive mode, the first byte transmitted con-
tains seven bits of address data and the R/W bit. In this
case, the R/W bit will be logic '1'. Thus, the first byte
transmitted is a 7-bit slave address followed by a '1' to
indicate receive. Serial data is received via SDA, while
SCL outputs the serial clock. Serial data is received
eight bits at a time. After each byte is received, an
Acknowledge bit is transmitted. The START condition
indicates the beginning of a transmission. The master-
receiver terminates slave transmission by responding
to the last byte with a NACK Acknowledge and follows
this with a STOP condition to indicate to other masters
that the bus is free.
Master mode reception is enabled by setting the
receive enable bit, RCEN (SSPCON2<3>), immedi-
ately following the Acknowledge sequence.
The baud rate generator begins counting, and on each
rollover, the state of the SCL pin changes (high to low/
low to high) and data is shifted into the SSPSR. After
the falling edge of the eighth clock, the following events
occur:
• The receive enable bit is automatically cleared.
• The contents of the SSPSR are loaded into the
SSPBUF.
• The BF flag is set.
• The SSPIF is set.
• The baud rate generator is suspended from
counting, holding SCL low.
The SSP is now in IDLE state, awaiting the next com-
mand. When the buffer is read by the CPU, the BF flag
is automatically cleared. The user can then send an
Acknowledge bit at the end of reception by clearing the
ACKDT bit (SSPCON2<5>) and setting the Acknowl-
edge sequence enable bit, ACKEN (SSPCON2<4>).
A typical receive sequence would go as follows:
a)
The user generates a START Condition by set-
ting the START enable bit (SEN) in SSPCON2.
b)
SSPIF is set at the completion of the START
sequence.
c)
The user resets the SSPIF bit and loads the
SSPBUF with seven bits of address in the MSbs
and the LSb (R/W bit) set to '1' for receive.
d)
Address and R/W is shifted out the SDA pin until
all eight bits are transmitted.
e)
The MSSP Module shifts in the ACK bit from the
slave device, and writes its value into the
SSPCON2 register (SSPCON2<6>).
f)
The module generates an interrupt at the end of
the ninth clock cycle by setting SSPIF.
g)
The user resets the SSPIF bit and sets the
RCEN bit to enable reception.
h)
DATA is shifted into the SDA pin until all eight
bits are received.
i)
The MSSP module sets the SSPIF bit and clears
the RCEN bit at the falling edge of the eighth
clock.
j)
The user resets the SSPIF bit and sets the
ACKDT bit to '0' (ACK), if another byte is antici-
pated. Otherwise, the ACKDT bit is set to '1'
(NACK) to terminate reception. The user sets
ADKEN to start the Acknowledge sequence.
k)
The MSSP module sets the SSPIF bit at the
completion of the Acknowledge.
l)
If a NACK was sent in step ( j), then the user pro-
ceeds with step ( m). Otherwise, reception con-
tinues by repeating steps ( g) through ( j).
m) The user generates a STOP condition by setting
the STOP enable bit PEN in SSPCON2.
n)
SSPIF is set when the STOP condition is complete.
9.2.13.1
BF STATUS FLAG
In receive operation, BF is set when an address or data
byte is loaded into SSPBUF from SSPSR. It is cleared
by hardware when SSPBUF is read.
9.2.13.2
SSPOV STATUS FLAG
In receive operation, SSPOV is set when eight bits are
received into the SSPSR and the BF flag is already set
from a previous reception.
9.2.13.3
WCOL STATUS FLAG
If the user writes the SSPBUF when a receive is
already in progress (i.e., SSPSR is still shifting in a data
byte), then WCOL is set and the contents of the buffer
are unchanged (the write doesn’t occur).
Note:
The MSSP Module must be in an IDLE
STATE before the RCEN bit is set or the
RCEN bit will be disregarded.



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