A little background before I proceed with my question.
I am designing a universal charger for NiMh battery type, my design incorporates an ATtiny85 as a dedicated controller for the constant current source and it will communicate with an ATmega328P(which in the main controller for the user interface and runs a -dV termination algorithm for charge termination) over an I2C bus.
My application requires to have a precision external reference on the ATtiny85 since the internal reference isn't good enough and I am only getting good results when using the external reference, the Aref and SDA pin on the ATtiny85 is same, when the charger circuit is turned ON the Atmega328P needs to pass on a current setpoint to the ATtiny85, once the setpoint is passed on to the ATtiny85 then there is no further communication between the microcontrollers and both work independently, is it possible that I use a relay on the ATtiny side in order to disconnect the SDA pin from the I2C bus once the communication has ended and attach a precision reference to it after calling
has anyone ever tried something of this nature? is it ok to first use the SDA pin for communication on the I2C bus and then change it functionality over to the analog external reference?
I haven't put together a code for it yet, I have separate code running on the ATmega328p and ATtiny85 which I will extend by adding the I2C function, just though it'd be better to take some advice before I implement it.