Skip to contentSkip to conversation

External sensor and i2c/parallel adapters

lm-sensors Fred Labrosse 3 participants 4 messages May 26, 2005 – Jan 16, 2007

lore
Share & tools
lore
#0 lore raw

All,

I need to connect a compass having an i2c bus to a computer. The current plan is to use one of these i2c/parallel port adapters. However, I'm not sure if it will indeed work. Here is what I think at the moment.

Many kernel drivers do support e.g. the Philips adapters. However, it seems that this is not to use the adapter externally. This would however work with the i2c-pcf-epp driver, but it hasn't been ported yet to linux 2.6 (I saw a more than 1 year old message on that on this list, but no follow up).

The doc for the i2c-parport kernel module gives the schematics of a diy "i2c-over-parallel-port" adapter. Anybody knows how easy it is to use?

Any suggestions?

Cheers,

Fred

#1 lore raw

Hi Fred,

Quoted 10 lines

I need to connect a compass having an i2c bus to a computer. The current plan is to use one of these i2c/parallel port adapters. However, I'm not sure if it will indeed work. Here is what I think at the moment.

Many kernel drivers do support e.g. the Philips adapters. However, it seems that this is not to use the adapter externally. This would however work with the i2c-pcf-epp driver, but it hasn't been ported yet to linux 2.6 (I saw a more than 1 year old message on that on this list, but no follow up).

There are two kinds of parallel port adapters which can be used to control an I2C bus.

The first kind uses the parallel port to address an external I2C master, such as the Philips PCF8584. What goes through the parallel port in this case are commands for the external master (and data bytes, of course). That's what the i2c-pcf-epp driver does.

The second, more popular kind controls the lines of an I2C bus directly through the parallel port pins. In other words, the parallel port is the I2C master itself. There are various implementations, some use the same pin to read and write, others use different pins. That's what the new i2c-parport drivers does.

In almost all cases you need to wire some electronic components between the parallel port and the i2c client chip(s), except for the i2c-pport driver (*not* the same as i2c-parport).

Quoted 3 lines

The doc for the i2c-parport kernel module gives the schematics of a diy "i2c-over-parallel-port" adapter. Anybody knows how easy it is to use?

I'm not sure I get what your question really means. If you are able to build the adapter as described, you get a fully controllable I2C bus. The hard part is to build it. Once it's done, using it is just as easy as using any other I2C or SMBus adapter under Linux.

Quoted 1 line

Any suggestions?

If you have the required electronics skills, simply build the adapter according to the schematics of the i2c-parport documentation (second one is better).

Also note that many recent motherboards have SMBus pins which you could use directly if your compass works using standard SMBus commands.

Signature · 1 line
Jean Delvare
#2 lore raw
In reply to Fred Labrosse
Quoted 13 lines · On Sat, 28 May 2005 16:38:31 +0200 Jean Delvare <[email protected]> wrote:

Hi Fred,

Quoted 10 lines

I need to connect a compass having an i2c bus to a computer. The current plan is to use one of these i2c/parallel port adapters. However, I'm not sure if it will indeed work. Here is what I think at the moment.

Many kernel drivers do support e.g. the Philips adapters. However, it seems that this is not to use the adapter externally. This would however work with the i2c-pcf-epp driver, but it hasn't been ported yet to linux 2.6 (I saw a more than 1 year old message on that on this list, but no follow up).

Quoted 7 lines

There are two kinds of parallel port adapters which can be used to control an I2C bus.

The first kind uses the parallel port to address an external I2C master, such as the Philips PCF8584. What goes through the parallel port in this case are commands for the external master (and data bytes, of course). That's what the i2c-pcf-epp driver does.

But it hasn't been ported to linux-2.6 yet.

Quoted 6 lines

The second, more popular kind controls the lines of an I2C bus directly through the parallel port pins. In other words, the parallel port is the I2C master itself. There are various implementations, some use the same pin to read and write, others use different pins. That's what the new i2c-parport drivers does.

A long time ago (a year ago?) I have tried to plug it directly a suggested somewhere (can't remember) but it didn't work because of differences in levels (the compass wasn't pulling enough one of the ways if I remember well).

Quoted 14 lines

In almost all cases you need to wire some electronic components between the parallel port and the i2c client chip(s), except for the i2c-pport driver (*not* the same as i2c-parport).

Quoted 3 lines

The doc for the i2c-parport kernel module gives the schematics of a diy "i2c-over-parallel-port" adapter. Anybody knows how easy it is to use?

I'm not sure I get what your question really means. If you are able to build the adapter as described, you get a fully controllable I2C bus. The hard part is to build it. Once it's done, using it is just as easy as using any other I2C or SMBus adapter under Linux.

Quoted 5 lines
Quoted 1 line

Any suggestions?

If you have the required electronics skills, simply build the adapter according to the schematics of the i2c-parport documentation (second one is better).

Exactly what I needed to hear.

Thanks.

Fred

#3 lore raw
In reply to Fred Labrosse

__________ NOD32 EMON 1.1856 (20061106) Inform?ci? __________

Az ?zenetet a NOD32 antivirus system megvizsg?lta.
cimzett: lm-sensors at lm-sensors.org targgyal[lm-sensors] External sensor and i2c/parallel adapters datummal 01/16/2007 11:44 - rendbenemail

http://www.nod32.hu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20070116/9ff34f4d/attachment.html