k článku: Stavba staničných digitálnych hodín
zo dňa 12.06.2017, autor článku: Boris Pecháň
Sorry, it is not open source, but at least core hint, assuming your question is about analogue mode. You need to look at PA1 and PD1, where OPAMP outputs are connected, one of them is for positive polarity, another one for negative. So if you evaluate e.g. (PINA & 0b10) + ((PIND & 0b10) >> 1), it gives you 0b01 for positive impulse and 0b10 for negative impulse. If zero, then nothing. Minutes should be added only if they alternate in proper sequence +-+-+-. If there are impulses of the same polarity +++ or ---, nothing happens. And of course, some debouncing should not be omitted. ph
Zobraziť článok Stavba staničných digitálnych hodín