Hack a datalogger into existing design

Apr 11, 2020 4 Replies

Pretty sure the answer is "Yes", but let me ask it anyway....



Situation: Need to add a datalogger to an existing design, but there are no free ports left on the microcontroller.



The microcontroller is an AT89LP51ED2. (An 8-bit, 8051 variant) Port-0 outputs data ONLY to (3) D-Type transparent octal latches (74ACT573N), which are individually latched via some pins on Port-2 of the microcontroller.



The latches are written infrequently, and are never left un-latched in normal operation (i.e., we don't use the "transparent" feature of this part).



So....



Can I use a couple of Port-0 port pins for I2C SDA & SCL lines to connect up some parts to make a datalogger? (I'm thinking a 24C32 for the memory, and DS3231 for the RTC.)



It seems to me that as long as the 573 latches are latched with the intended data, I can then do whatever I want with the Port-0 pins (such as service a RTC & Memory datalogger).



All the voltages are OK (+5 VDC is used everywhere in this particular product).



So other than adjusting the code, is there anything I'm missing?



Thanks for looking / confirming this will work. (?)


You need some way to make sure writing data to the latches doesn't mess up your SDA & SCL lines.

Another approach would be to replace the 573 with a 595, which would free up 5 pins.

Cheers

Phil Hobbs

Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC / Hobbs ElectroOptics Optics, Electro-optics, Photonics, Analog Electronics Briarcliff Manor NY 10510 http://electrooptical.net http://hobbs-eo.com

orts left on the microcontroller.

573N), which are individually latched via some pins on Port-2 of the microc ontroller.

normal operation (i.e., we don't use the "transparent" feature of this part ).

ct up some parts to make a datalogger? (I'm thinking a 24C32 for the memor y, and DS3231 for the RTC.)

ended data, I can then do whatever I want with the Port-0 pins (such as ser vice a RTC & Memory datalogger).

product).

it would free even more, only three pins needed to drive a string of shift registers, instead of the 8data + 3latch

Five pins, for large values of five. ;)

Cheers

Phil Hobbs

Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC / Hobbs ElectroOptics Optics, Electro-optics, Photonics, Analog Electronics Briarcliff Manor NY 10510 http://electrooptical.net http://hobbs-eo.com

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required