sharing the EEPROM write protect pin.

fernando_g

Senior Member
The ubiquitous 24Lxxx-series of I2C EEPROMS have this hardware write protect pin, which protects the whole array.

I've always wondered the necessity of such a pin on an I2C-compatible memory, as the I2C address' last bit is the one that tells the memory whether a read or a write is being performed.
In plain English, is this pin redundant?
Nevertheless, I consider it a good engineering practice, and have always used a spare Picaxe pin to write-protect the memory when not specifically making a write operation.

Now, the problem at hand; On a project I made, I have to provide a short beep, to provide audible feedback that certain functions have been enabled.
Bang my head on the floor, I did not consider this situation, and I've maxed out all of the Picaxe's 14M2 pins.

The only semi spare port is -you may have guessed it already- is the one I use for the memory's WP.

Now, and reading Microchip's datasheet:

6.3 Write Protection
The WP pin allows the user to write-protect the entire array (0000-7FFF) when the pin is tied to VCC. If tied to VSS the write protection is disabled. The WP pin is sampled at the Stop bit for every Write command. Toggling the WP pin after the Stop bit will have no effect on the execution of the write cycle.

My interpretation of this statement is, that if absolutely and positively I make sure there is no I2C activity at the time, I can hang a small piezo buzzer on the pin and output a short beep, making sure that the pin returns to VCC after the beep.
Is my understanding correct?
 

eggdweather

Senior Member
I think your reasoning is sound and there appear to be no obvious issues with toggling the write protect pin whilst generating a sound signal. You could add a capacitor across the pin and feed that with a diode, so that when you pull the line down to generate the signal, it will reverse the diode and isolate the pin, which is then held high by the capacitor. I would think the input impedance is sufficiently high to not discharge the capacitor during the period of time you take the PICAXE pin low to drive the buzzer.
 

fernando_g

Senior Member
I believe that is an excellent idea! However, the PWBs are already built up, and I would have to deadbug the components. Therefore, I would first give it a try "as is".
 

Technical

Technical Support
Staff member
As you suggest, many people simply tie the WP to ground, so if you do that you could cut the track to give you a spare pin to do what you like with.
 
Top