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 implemented by GPIO

Status
Not open for further replies.

ubuntu_amateur

Member level 4
Joined
Sep 24, 2006
Messages
71
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,665
i2c gpio

On our board we are planning to connect 2 devices(slave) with I2C interface to 1 MCU (master). But the master (MCU) has NO I2C interface, should use 2 GPIO pins to simulate I2C timing, to implement the communication between processor and the devices.

The host processor will be running linux 2.4.X on it.

How to write a driver to implement I2C function with GPIO?
Could anyone heeeeelp me? Any suggestions are appreciated!
 

linux i2c gpio

can u please suggest me some resources to implement the timining transaction between the host and the slaves.
actually i want to implement the I2C adaptor part as a software layer, on X86 based pc with 2.6 kernel. and the I2C slave EEPROM device (24Cxx) is connected to the pc through parallel port

thankyou
kk
 

gpio i2c driver

Chose two I/O pins for SDA and SCL and connect them to I2C device(slave mode) directly.
See, it works.

The C code for 8051:
 

gpio i2c linux

thanks for ur reply Harry

i am sorry actually i have to chance the subject in the previous post
my query is not, implementation of I2C by GPIO
I actually want to implement the I2C protocol on a linux (2.6 kernel) based PC
through the parallel port. i hope u got my point

i want to implement the I2C Adapter as a software loadable module over the existing i2c-core and parport module. and connect a I2C slave eeprom (24CXX) chip to parallel port and perform the read and write operations

thank you.
kk
 

using gpio as i2c driver

a driver for I2C implementation has been completed. there is a new requirement: to implement an I2C slave with MCU.

any suggestions?
 

hi,

Can you please say how you implemented the I2C-GPIO driver.?

1. Have you used the Linux I2C framework.?
If so, how to tell kernel of your custom GPIOs(SDA and SCL).?
where exactly I hack.? and how I control it from user space.?

2.Or made a new driver by reimplementing all the I2C functionalities.?
Any special consideration to be made

I am using kernel 2.6.26..

Any help will be appreciated.

Many thanks, betz
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top