Hello Davide,
First welcome to the forum! I dream since many years to a decoder for signals that works on the base of how TrainController manages the 3/4 aspects signals ("combinatorial logic").
I've no special knowledge in Microcontrollers but have some basics in analog and numeric electronics.
_________________
A+ Yann
Mes tuto vidéo sur TrainController => https://www.youtube.com/TheDigitrain <=
Consultant technique planification/création/programmation => http://www.digi-train.ch <=
TC 9,10 Gold / +SmartHand Mobile / H0 3 rails, 2 rails / Tams MasterControl et MC2 / ESU ECoS / Rétro. et commande des signaux: Selectrix SLX852 Interface / BiDiBus / PC 3,3 GHz / Win 10, 11 / iPhone 8