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.

i2c over parallel port

Status
Not open for further replies.

kk2mkk

Member level 2
Joined
Apr 20, 2006
Messages
44
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Location
Hyderabad India
Activity points
1,622
lpt port impliment i2c

can any one help me how to simulate i2c protocol over parallel port
i have compiled the modules i2c-parport.ko and also built the hardware module given kernel documentation but i am not able to establish an interfacing between the driver module and the hardware connected to the parallel port

plz any one suggest some hardware changes if any

thanks
 

i2c-parport.ko

can i ask about the distance between pc and the target device

also what about frequency?
 

use two line to simulation the I2C.
your should known the protocol of I2C the parallel port program
 

you cannot implement I2C connecting SDA and SCL directly to the port pins. If you read the I2C specs, you'll find that there are conditions like arbitration or clock stretching, where one device pulls the line low, the other pulls the line high. Also in the I2C specs you will see that all devices on the I2C bus are open collector or open drain, and the bus has a pull-up resistor for both lines. The parallel port has push-pull lines, so, connecting I2C devices to it can lead to malfunction, or, in extreme cases to the deterioration of the components (or the port pins). To correctly implement I2C, you can use a buffer that can be put in high impedance (has enable pin), like 74hc125. Connect the input to the ground, and use the enable signal like data. You will also have to use another buffer from the hc125 to read the same line, but for reading you will have the output always enabled. Implement this once for the SDA and once for the SCL, and you have your I2C interface.

Hope you got the picture, if not, PM and i will try to make a schematic for you.
 

this may be helpful for your design, thanks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top