r.marek at sh.cvut.cz
Sun Apr 17 22:28:39 CEST 2005
> Hi again!
> So I tried to load the following modules: i2c_core, i2c_algo_bit,
> i2c_pport, i2c_dev, i2c_sensor, pcf8574.
> Should I be able to se my pcf8574 chip that is hooked up on my parallel
> port now? Cause I can not! Do I have to consider cables (length and
> others) or have I done anything else wrong? Some hints on trouble shooting
> would be apreciated.
I used cables like 2 meters but I think they can have much more.
As for trouble shooting. You can try if the driver can force the lines to 0 and
1 so you know it is not "stuck". This can be done via kernel module parameter
modinfo i2c-algobit (or i2c-algo-bit)
There is the parameter called bit_test
Unload all modules modrobe i2c-algo-bit bit_test=1
watch the system log.
If it says line is stuck, something with the parport is wrong.Double check that
you have iobase 0x378 in bios and it is set to "standart" or SPP mode only.
Also be sure no other drivers for parallel port got loaded
Later you need to modprobe the pcf8574 this chip cant be detected so it must be
forced. You can do:
modprobe pcf7485 force=b,0x20,b,0x21
replace b with your bus number
it will be zero if no other i2c-bus modules are loaded
the 0x20 is first chip address 0x21 is second chip address. if you have only one
just delete the second part.
Then you can watch /sys/bus/i2c/devices/0-0020/read
If you put zero to some PIN the value will change
watch cat /sys/bus/i2c/devices/0-0020/read
and with wire connecting some pins of chip to GND...
More information about the lm-sensors