PIC12F1822 MICROCHIP [Microchip Technology], PIC12F1822 Datasheet - Page 247

no-image

PIC12F1822

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

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC12F1822-E/SN
Manufacturer:
ABILIS
Quantity:
15 400
Part Number:
PIC12F1822-E/SN
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC12F1822-E/SN
0
Part Number:
PIC12F1822-I/MF
Manufacturer:
ALLEGRO
Quantity:
1 001
Part Number:
PIC12F1822-I/MF
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC12F1822-I/P
Manufacturer:
MICROCHIP
Quantity:
1 200
Part Number:
PIC12F1822-I/P
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC12F1822-I/SN
Manufacturer:
MICROCHIP
Quantity:
4 500
Part Number:
PIC12F1822-I/SN
Manufacturer:
MICROCHI
Quantity:
1 700
Part Number:
PIC12F1822-I/SN
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC12F1822-I/SN
0
Company:
Part Number:
PIC12F1822-I/SN
Quantity:
30 000
Part Number:
PIC12F1822T-I/MF
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC12F1822T-I/SN
0
24.5.3
When the R/W bit of the incoming address byte is set
and an address match occurs, the R/W bit of the
SSP1STAT register is set. The received address is
loaded into the SSP1BUF register, and an ACK pulse
is sent by the slave on the ninth bit.
Following the ACK, slave hardware clears the CKP bit
and the SCL pin is held low (see Section 24.5.6
“Clock Stretching” for more detail). By stretching the
clock, the master will be unable to assert another clock
pulse until the slave is done preparing the transmit
data.
The transmit data must be loaded into the SSP1BUF
register which also loads the SSP1SR register. Then
the SCL pin should be released by setting the CKP bit
of the SSP1CON1 register. The eight data bits are
shifted out on the falling edge of the SCL input. This
ensures that the SDA signal is valid during the SCL
high time.
The ACK pulse from the master-receiver is latched on
the rising edge of the ninth SCL input pulse. This ACK
value is copied to the ACKSTAT bit of the SSP1CON2
register. If ACKSTAT is set (not ACK), then the data
transfer is complete. In this case, when the not ACK is
latched by the slave, the slave goes idle and waits for
another occurrence of the Start bit. If the SDA line was
low (ACK), the next transmit data must be loaded into
the SSP1BUF register. Again, the SCL pin must be
released by setting bit CKP.
An MSSP1 interrupt is generated for each data transfer
byte. The SSP1IF bit must be cleared by software and
the SSP1STAT register is used to determine the status
of the byte. The SSP1IF bit is set on the falling edge of
the ninth clock pulse.
24.5.3.1
A slave receives a Read request and begins shifting
data out on the SDA line. If a bus collision is detected
and the SBCDE bit of the SSP1CON3 register is set,
the BCL1IF bit of the PIRx register is set. Once a bus
collision is detected, the slave goes Idle and waits to be
addressed again. User software can use the BCL1IF bit
to handle a slave bus collision.
 2010 Microchip Technology Inc.
SLAVE TRANSMISSION
Slave Mode Bus Collision
PIC12F/LF1822/16F/LF1823
Preliminary
24.5.3.2
A master device can transmit a read request to a
slave, and then clock data out of the slave. The list
below outlines what software for a slave will need to
do
Figure 24-17 can be used as a reference to this list.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10. SSP1IF is set after the ACK response from the
11. SSP1IF bit is cleared.
12. The slave software checks the ACKSTAT bit to
13. Steps 9-13 are repeated for each transmitted
14. If the master sends a not ACK; the clock is not
15. The master sends a Restart condition or a Stop.
16. The slave is no longer addressed.
Note 1: If the master ACKs the clock will be
Master sends a Start condition on SDA and
SCL.
S bit of SSP1STAT is set; SSP1IF is set if inter-
rupt-on-Start detect is enabled.
Matching address with R/W bit set is received by
the Slave setting SSP1IF bit.
Slave hardware generates an ACK and sets
SSP1IF.
SSP1IF bit is cleared by user.
Software reads the received address from
SSP1BUF, clearing BF.
R/W is set so CKP was automatically cleared
after the ACK.
The slave software loads the transmit data into
SSP1BUF.
CKP bit is set releasing SCL, allowing the mas-
ter to clock the data out of the slave.
master is loaded into the ACKSTAT register.
see if the master wants to clock out more data.
byte.
held, but SSP1IF is still set.
to
2: ACKSTAT is the only bit updated on the
accomplish
stretched.
rising edge of SCL (9th) rather than the
falling.
7-bit Transmission
a
standard
DS41413A-page 247
transmission.

Related parts for PIC12F1822