The DS3231 RTC chips have an open drain output (SQW) that produces pulses with an output frequency from 1Hz to 8 kHz, set with an internal register. There is a battery backup mode that enables this output when an external source of power is not present, so that the module can still be used for timekeeping. Of course, the data sheet instructs to use a pullup to an external power source when using the output in this mode. http://datasheets.maximintegrated.com/en/ds/DS3231.pdf
In my first lashups with a scope, I verified that the output appeared to work as advertised, but when connected to an MCU input pin with a 50K ohm internal pullup resistor enabled, no pulses were observed.
Re-investigating, connections to the battery backed module were made using only the ground and SQW pins, with a pullup resistor from SQW to +5 V supplied externally. All grounds are connected, of course.
Indeed, with a 50K pullup, the SQW output voltage is near zero at all times (observed with a scope with 10Mohm input impedance). With a 3.9K pullup, I see a square pulse from 0 V to 4.5V. For pullup values in between, the pulse becomes less positive, dropping to about 1V at 20K ohms. Two such modules behave identically.
What is going on?
Solved: the modules have a tiny 4.7 K pullup from SQW to module Vcc, which was loading down the external pullup. Edit: Remove that stupid pullup, as described here: https://edwardmallon.wordpress.com/2014 … from-ebay/