PIC12F1840 MICROCHIP [Microchip Technology], PIC12F1840 Datasheet - Page 241

no-image

PIC12F1840

Manufacturer Part Number
PIC12F1840
Description
8-Pin Flash Microcontrollers with nanoWatt XLP Technology
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC12F1840-E/MF
Manufacturer:
MICROCHIP
Quantity:
3 000
Part Number:
PIC12F1840-E/SN
Manufacturer:
TI
Quantity:
1 200
Part Number:
PIC12F1840-E/SN
0
Part Number:
PIC12F1840-I/MF
Manufacturer:
CONEXANT
Quantity:
101
Part Number:
PIC12F1840-I/P
Manufacturer:
MICROCHIP
Quantity:
200
Part Number:
PIC12F1840-I/SN
Manufacturer:
MICROCHIP
Quantity:
4 500
Part Number:
PIC12F1840-I/SN
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC12F1840-I/SN
0
Company:
Part Number:
PIC12F1840-I/SN
Quantity:
10 300
Company:
Part Number:
PIC12F1840-I/SN
Quantity:
10 900
Part Number:
PIC12F1840T-E/SN
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC12F1840T-E/SN
0
Company:
Part Number:
PIC12F1840T-I/SNVAO
Quantity:
32
25.5.6
Clock stretching occurs when a device on the bus
holds the SCL line low effectively pausing communica-
tion. The slave may stretch the clock to allow more
time to handle data or prepare a response for the mas-
ter device. A master device is not concerned with
stretching as anytime it is active on the bus and not
transferring data it is stretching. Any stretching done
by a slave is invisible to the master software and han-
dled by the hardware that generates SCL.
The CKP bit of the SSP1CON1 register is used to con-
trol stretching in software. Any time the CKP bit is
cleared, the module will wait for the SCL line to go low
and then hold it. Setting CKP will release SCL and
allow more communication.
25.5.6.1
Following an ACK if the R/W bit of SSP1STAT is set, a
read request, the slave hardware will clear CKP. This
allows the slave time to update SSP1BUF with data to
transfer to the master. If the SEN bit of SSP1CON2 is
set, the slave hardware will always stretch the clock
after the ACK sequence. Once the slave is ready; CKP
is set by software and communication resumes.
FIGURE 25-23:
 2011 Microchip Technology Inc.
SSP1CON1
WR
SDA
SCL
CKP
Note 1: The BF bit has no effect on if the clock will
CLOCK STRETCHING
2: Previous versions of the module did not
Normal Clock Stretching
Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4
be stretched or not. This is different than
previous versions of the module that
would not stretch the clock, clear CKP, if
SSP1BUF was read before the 9th falling
edge of SCL.
stretch the clock for a transmission if
SSP1BUF was loaded before the 9th fall-
ing edge of SCL. It is now always cleared
for read requests.
CLOCK SYNCHRONIZATION TIMING
DX
Master device
asserts clock
Preliminary
25.5.6.2
In 10-bit Addressing mode, when the UA bit is set, the
clock is always stretched. This is the only time the SCL
is stretched without CKP being cleared. SCL is
released immediately after a write to SSP1ADD.
25.5.6.3
When AHEN bit of SSP1CON3 is set; CKP is cleared
by hardware after the 8th falling edge of SCL for a
received matching address byte. When DHEN bit of
SSP1CON3 is set; CKP is cleared after the 8th falling
edge of SCL for received data.
Stretching after the 8th falling edge of SCL allows the
slave to look at the received address or data and
decide if it wants to ACK the received data.
25.5.7
Any time the CKP bit is cleared, the module will wait
for the SCL line to go low and then hold it. However,
clearing the CKP bit will not assert the SCL output low
until the SCL output is already sampled low. There-
fore, the CKP bit will not assert the SCL line until an
external I
SCL line. The SCL output will remain low until the CKP
bit is set and all other devices on the I
released SCL. This ensures that a write to the CKP bit
will not violate the minimum high time requirement for
SCL (see
Master device
releases clock
Note: Previous versions of the module did not
CLOCK SYNCHRONIZATION AND
THE CKP BIT
2
stretch the clock if the second address byte
did not match.
Figure
C master device has already asserted the
10-bit Addressing Mode
Byte NACKing
PIC12F/LF1840
25-22).
DS41441A-page 241
DX ‚
2
C bus have
1

Related parts for PIC12F1840