application over i2c n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
APPLICATION OVER I2C PowerPoint Presentation
Download Presentation
APPLICATION OVER I2C

Loading in 2 Seconds...

play fullscreen
1 / 15

APPLICATION OVER I2C - PowerPoint PPT Presentation


  • 92 Views
  • Uploaded on

APPLICATION OVER I2C. Kıvanç ÖZBEK 504031549. What is I2C?. 2-wired communication interface Communication protocol used in small areas Defined in 1980’s by Philiphs Bidirectional data transmission 7 bit slave address Acknowledgement after each byte. I2C Properties.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'APPLICATION OVER I2C' - phiala


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
application over i2c

APPLICATION OVER I2C

Kıvanç ÖZBEK

504031549

what is i2c
What is I2C?
  • 2-wired communication interface
  • Communication protocol used in small areas
  • Defined in 1980’s by Philiphs
  • Bidirectional data transmission
  • 7 bit slave address
  • Acknowledgement after each byte
i2c properties
I2C Properties
  • Random selection procedure
  • Transmission capacity up to 400 KHz
  • Line length up to 4 meters
  • Line capacitance up to 400 pF
  • Divice capacitance up to 10 pF
roles
Roles
  • Master
    • Controling the clock signal
    • Defining the slave address
    • Defining the Start – Stop conditions
  • Slave
    • Sending ack after each byte
    • Controling the data line during read operations
    • Taking clock from the line
about the application1
About the application
  • The term open-collector typically refers to a transistor output where the collector (output) of the transistor is not connected to a positive voltage. Since a transistor used in outputs is a saturated switch, the collector needs to be connected to a positive voltage to complete the transistor circuit. This positive voltage need not be any specific value as long as it is above the saturation of the transistor. Because of this, an open collector output can be connected to a range of voltages using a pullup resistor. This resistor is required for the output to function as it completes the transistor's circuit.
about the application5
About the application

wvalue=0x00;

rvalue = outp(data,wvalue);

delay(wait);

wvalue=0x0f;

rvalue=outp(control,wvalue);/*scl ve sda 1 yapildi*/

delay(wait);

wvalue=0x80;

rvalue = outp(data,wvalue);/*sda 0 yaparak start cond. olusturuldu*/

about the application6
About the application

wvalue=0x00;

rvalue=outp(control,wvalue); /*scl 0 yapildi*/

delay(wait);

wvalue=0x80;

rvalue = outp(data,wvalue); /*sda 0 yapildi*/

delay(wait);

wvalue=0x0f;

rvalue=outp(control,wvalue); /*scl 1 yapildi*/

delay(wait);

wvalue=0x00;

rvalue = outp(data,wvalue); /*sda 1 yapilarak stop cond. olusturuldu*/

delay(wait);

about the application7
About the application
  • check:
  • for(i;i<5;i++){
  • rvalue=inportb(status);
  • rvalue<<=4;
  • delay(wait);
  • if(rvalue>127){ //scl 0 okundu
  • delay(wait);
  • rvalue=inportb(status);
  • rvalue<<=4;
  • if(rvalue<128){ //scl 1 okunursa hat mesgul
  • printf("Hat mesgul\n");
  • i=0;
  • }
  • else{//isMain 0 ise sda 1 kalacaktir dolayisiyla ana master calisir
  • wvalue=isMain;
  • rvalue = outp(data,wvalue);//sda belirlenerek hat sahipligi olustu
  • delay(wait);
  • }
about the application8
About the application
  • }
  • }
  • printf("Hat uygun kullanilabilir\n");
  • wvalue=0x00;
  • rvalue=outp(control,wvalue); //scl 0
  • delay(wait*2);
  • if(inportb(status) > 127){ //sda kontrol edildi
  • printf("Ana master calisacak\n");
  • goto check;
  • }
encountered difficulties
Encountered Difficulties
  • No direct access to parallel port in XP
    • Because it is not allowed to use ports directly in windows xp, windows me is used.
  • No device to watch parallel port outputs
    • There were no hardware to watch the outputs so again parallel port is used to see what is written to the port.
  • Outer power supply
    • Game port pin 1(Vcc) and pin 4(Gnd) used.