Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
9
Добавлен:
21.12.2020
Размер:
8.16 Mб
Скачать

PIC18F8722 FAMILY

19.4.17.3Bus Collision During a Stop Condition

Bus collision occurs during a Stop condition if:

a)After the SDAx pin has been deasserted and allowed to float high, SDAx is sampled low after the BRG has timed out.

b)After the SCLx pin is deasserted, SCLx is sampled low before SDAx goes high.

The Stop condition begins with SDAx asserted low. When SDAx is sampled low, the SCLx pin is allowed to float. When the pin is sampled high (clock arbitration), the Baud Rate Generator is loaded with SSPxADD<6:0> and counts down to ‘0’. After the BRG times out, SDAx is sampled. If SDAx is sampled low, a bus collision has occurred. This is due to another master attempting to drive a data ‘0’ (Figure 19-31). If the SCLx pin is sampled low before SDAx is allowed to float high, a bus collision occurs. This is another case of another master attempting to drive a data ‘0’ (Figure 19-32).

FIGURE 19-31: BUS COLLISION DURING A STOP CONDITION (CASE 1)

 

 

 

 

 

TBRG

 

TBRG

 

TBRG

 

 

SDAx sampled

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

low after TBRG,

SDAx

 

 

 

 

 

set BCLxIF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SDAx asserted low

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SCLx

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PEN

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

BCLxIF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

P

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SSPxIF

 

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

FIGURE 19-32: BUS COLLISION DURING A STOP CONDITION (CASE 2)

TBRG

TBRG

 

TBRG

 

 

 

 

 

 

 

 

 

 

 

SDAx

Assert SDAx

SCLx

PEN

BCLxIF

SCLx goes low before SDAx goes high, set BCLxIF

P

0

SSPxIF

 

0

DS39646B-page 244

Preliminary

2004 Microchip Technology Inc.

PIC18F8722 FAMILY

TABLE 19-4: REGISTERS ASSOCIATED WITH I2C™ OPERATION

 

 

 

 

 

 

 

 

 

 

 

 

 

Reset

Name

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

Values

 

 

 

 

 

 

 

 

 

 

 

 

 

on page

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

INTCON

GIE/GIEH

PEIE/GIEL

TMR0IE

INT0IE

RBIE

TMR0IF

INT0IF

RBIF

57

PIR1

PSPIF

ADIF

RC1IF

TX1IF

SSP1IF

CCP1IF

TMR2IF

TMR1IF

60

PIE1

PSPIE

ADIE

RC1IE

TX1IE

SSP1IE

CCP1IE

TMR2IE

TMR1IE

60

IPR1

PSPIP

ADIP

RC1IP

TX1IP

SSP1IP

CCP1IP

TMR2IP

TMR1IP

60

PIR2

OSCFIF

CMIF

EEIF

BCL1IF

HLVDIF

TMR3IF

CCP2IF

60

PIE2

OSCFIE

CMIE

EEIE

BCL1IE

HLVDIE

TMR3IE

CCP2IE

60

IPR2

OSCFIP

CMIP

EEIP

BCL1IP

HLVDIP

TMR3IP

CCP2IP

60

PIR3

SSP2IF

BCL2IF

RC2IF

TX2IF

TMR4IF

CCP5IF

CCP4IF

CCP3IF

60

PIE3

SSP2IE

BCL2IE

RC2IE

TX2IE

TMR4IE

CCP5IE

CCP4IE

CCP3IE

60

IPR3

SSP2IP

BCL2IP

RC2IP

TX2IP

TMR4IP

CCP5IP

CCP4IP

CCP3IP

60

TRISC

TRISC7

TRISC6

TRISC5

TRISC4

TRISC3

TRISC2

TRISC1

TRISC0

60

 

 

 

 

 

 

 

 

 

 

TRISD

TRISD7

TRISD6

TRISD5

TRISD4

TRISD3

TRISD2

TRISD1

TRISD0

60

 

 

 

 

 

 

 

 

 

 

 

 

SSP1BUF

MSSP1 Receive Buffer/Transmit Register

 

 

 

 

 

 

58

 

 

 

 

 

 

 

 

 

SSP2BUF

MSSP2 Receive Buffer/Transmit Register

 

 

 

 

 

 

61

 

 

 

SSP1ADD

MSSP1 Address Register in I2C Slave mode. MSSP1 Baud Rate Reload Register in I2C

58

 

Master mode.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SSP2ADD

MSSP2 Address Register in I2C Slave mode. MSSP2 Baud Rate Reload Register in I2C

61

 

Master mode.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TMR2

Timer2 Register

 

 

 

 

 

 

 

 

 

 

58

 

 

 

 

 

 

 

 

 

 

 

 

 

PR2

Timer2 Period Register

 

 

 

 

 

 

 

 

 

 

58

 

 

 

 

 

 

 

 

 

 

SSP1CON1

WCOL

SSPOV

SSPEN

CKP

SSPM3

SSPM2

SSPM1

SSPM0

58

 

 

 

 

 

 

 

 

 

 

SSP1CON2

GCEN

ACKSTAT

ACKDT

ACKEN

RCEN

PEN

RSEN

SEN

58

 

 

 

 

 

 

 

 

 

 

 

 

SSP1STAT

SMP

CKE

 

 

 

P

S

 

 

 

UA

BF

58

D/A

 

R/W

SSP2CON1

WCOL

SSPOV

SSPEN

CKP

SSPM3

SSPM2

SSPM1

SSPM0

61

 

 

 

 

 

 

 

 

 

 

SSP2CON2

GCEN

ACKSTAT

ACKDT

ACKEN

RCEN

PEN

RSEN

SEN

61

 

 

 

 

 

 

 

 

 

 

SSP2STAT

SMP

CKE

 

 

 

P

S

 

 

 

UA

BF

61

D/A

 

R/W

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Legend: — = unimplemented, read as ‘0’. Shaded cells are not used by the MSSP module in I2C mode.

2004 Microchip Technology Inc.

Preliminary

DS39646B-page 245

PIC18F8722 FAMILY

NOTES:

DS39646B-page 246

Preliminary

2004 Microchip Technology Inc.

Соседние файлы в папке Склад