I2C on a 14M

Andrew Cowan

Senior Member
I'm upgrading a circuit board which used to talk to an ultrasonic range finder (via pulse widths). However, I have upgraded to using an SRF235, which uses I2C. It has four registers, one to write to, and two two read. The other is unused.

However, my circuit board has 5 other PICAXEs on, and I am reluctant to redesign it to use an X/X1/X2 chip, so I am investigating the possibility of bit-banging I2C.

The current setup:
The two pins connected to the range finder are leg 5 and leg 9 (in 2 and out 4).

I have had a look for hippy's code for I2C on an 08M, but I couldn't find it. Is it possible to bit bang this code on a 14M? If I run out of space/cannot use these pins, I will upgrade to a 20X2, but due to the lack of room on the board, I will need to amuputate the bottom 6 legs and still bit bang the protocol.

Is it possible on a 14M?

Thanks

Andrew
 

hippy

Technical Support
Staff member
Not sure where my earlier I2C code for 08M is but here's one version attached. It does soft-control of the I2C bus ( only ever output low or input to achieve a high on the bus ) which is what would be recommended.
 

Attachments

kd5crs

Senior Member
You've probably thought of this, but you could always make a 20x2 daughterboard that sits above the main board (and any space limitations). The daughterboard would route the 20x2 pins where you need them in the 14 pin footprint, leaving off 6 unused pins on the 20x2.

I've been cramming a lot of stuff into window blinds, which forces me to think 3D.

Brian
 
Top