Hi, I've a bit banging I2C implementation that uses port pins. Now I'd like to use it in several projects. But the projects have their I2C pins on different locations :-( I think there is no way to pass the address of a bit (port pin) to a function. As there is no indirect addressing in bit instructions it wouldn't help much anyway. So the only solution I have found so far is to define the I2C pins for every project and compile the module again. This is a thing I'd like to avoid. So I thought of importing an 'EXTRN bit(scl)' and declare the bit in another C-Module. So far all I've got are linker errors. Any idea how to do this? TIA Bernhard 'Gustl' Bauer
In a C file I had: "sbit SDAB = P2^3;" I tried the combination: EXTRN NUMBER(SDAB) you need to include the sbit..., you can not reference it externally. Thus the sbit... should be in a .h file included in both modules. Erik