viayner napisał: DS3131 nie ma zadnego alarmu
"Two programmable time-of-day alarms and a programmable square-wave output are provided. "
szewcu12 napisał: ale na jakim pinie będzie wywoływał "1" jeśli w programie SQW używam do liczenia 1s w sensie wchodzi w przerwanie co 1Hz
Jeśli uzywasz przerwania co 1s to po prostu musisz sprawdzać w rejestrach układu czy alarm został "wyzwolony".
Pin INT/SQW może mieć dwie funkcje jak opisano w DS:
"Active-Low Interrupt or Square-Wave Output. This open-drain pin requires an external pullup resistor connected to a supply at 5.5V or less. This multifunction pin is determined by the state of the INTCN bit in the Control Register (0Eh). When INTCN is set to logic 0, this pin outputs a square wave and its frequency is determined by RS2 and RS1 bits. When INTCN is set to logic 1, then a match between the timekeeping registers and either of the alarm registers activates the INT/SQW pin (if the alarm is enabled). Because the INTCN bit is set to logic 1 when power is first applied, the pin defaults to an interrupt output with alarms disabled. The pullup voltage can be up to 5.5V, regardless of the voltage on VCC. If not used, this pin can be left unconnected."
Jeśli zrezygnujesz z funkcji wystawiania fali prostokątnej, to poprzez bit INTCN w rejestrach ustawiony na 1, będziesz mógł uzyskać sygnał na pinie w momencie aktywacji alarmu.