Railnet

Komentáre

k článku: Stavba staničných digitálnych hodín

zo dňa 12.06.2017, autor článku: Boris Pecháň

Zdeno 15.06.2017 09:24:59

zajimave,
ja jsem Petrovi poslal taky popis podruznych hodin na svoji centralu hodin, ale trosku jinak.
Ty moje jsou urcene pro Loconet.

Reagovať

adriaan 01.12.2017 19:41:25

source code for the clock

Greetings,

is there a possebility to get the source code ?
i would be intrested how you do the detection og the clock signals on the line in the code.

with kind regards

Adriaan Bodewits

Reagovať

harmi 02.12.2017 14:11:39

source code for the clock

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

Reagovať

Zobraziť článok Stavba staničných digitálnych hodín