Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

what is role of SSPADD in i2c

Status
Not open for further replies.

hirataqdees

Newbie level 5
Newbie level 5
Joined
Dec 19, 2009
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
pakistan
Activity points
1,354
hey
can any one tell me what is the role of sspadd reg in i2c.
i want to connct a tmp snsor wid pic18f452.. and my crystal is of 12mhz.what shouil be the vaue of sspadd.its very urgent
regards
 

given in datasheet.

When the SSP is configured in Master mode, the lower seven bits of SSPADD act as the baud rate generator reload value.

use below settings:
SSPM3:SSPM0 bits = 1000 = I2C Master mode, clock = FOSC / (4 * (SSPADD+1))

now for 12 Mhz if you want to use 100khz for I2C clock
then SSPADD should be 0x1e i.e. 30decimal
 

What shall i put if my PIC is a slave?

Can i assign my SSPADD as 0b0111000 which as a slave address?
 

Hi,

SSPCON:
SSPM3:SSPM0: Synchronous Serial Port Mode Select bits
1111 = I2C Slave mode, 10-bit address with START and STOP bit interrupts enabled
1110 = I2C Slave mode, 7-bit address with START and STOP bit interrupts enabled
1011 = I2C Firmware Controlled Master mode (Slave IDLE)
1000 = I2C Master mode, clock = FOSC / (4 * (SSPADD+1))
0111 = I2C Slave mode, 10-bit address
0110 = I2C Slave mode, 7-bit address

Once the MSSP module has been enabled, it waits for a START condition to occur. Following the START condition, the 8-bits are shifted into the SSPSR register. All incoming bits are sampled with the rising edge of the clock (SCL) line. The value of register SSPSR<7:1> is compared to the value of the SSPADD register.

so you can assign SSPADD as 0b0111000 and your master should send this sequence.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top