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.

how to set trise register for i2c

Status
Not open for further replies.

raman00084

Full Member level 6
Joined
Nov 29, 2010
Messages
362
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
4,006
hi every one i am using ccs complier how to set trise resister for scl and sda pins . if it is input we will give 1 and 0 for out put. for the scl pin i can set 0 because it is output and for sda pin it is bidirectional what value 1 are 0 i must give?



regards
kalyan
 

Depends on your cable capacitance and required speed. The pullup/down resistor is the R in an RC timing circuit. The speed that your signal will transition will depend on R (your resistor) and C (the capacitance of that signal).

Define cable capacitance and choose Reff according to say <10% of bit period.
 

I believe configuring I2C with use i2c also sets all required registers. SCL is also operated as an open drain output in standard I2C, at least when using the I2C hardware interface.

I2C pullup resistors are required for both SDA and SCL.
 

What is the MCU that you are using?
Normally, When you are initializing a peripheral, you do not need to set directions of I/O pins that are related to the peripheral.
you need to use external pull-up resistors for I2C. You can not use internal pull-ups.
 

Hi..

In CCS compiler you don't need to set SDA, SCL is o/p or i/p pins. While creating a project you can configure the all pin functions..
 

Hi,

If I2c protocol is a part of your processor, so no need to set trise. You need to set the frequency of I2C and trise will be taken care by processor itself. But you should need pullups for both SDA and SCLK line.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top