Ik heb een vraagje. Ik zit nu op werk en mijn pauze is alweer voorbij maar heb jij misschien software omtrent het MM2 protocol die je wilt delen??
Ik moet dat hele protocol nog uitpluizen
https://www.modeltreno.com/motorola.html
Ik heb zelf ook een DCC centrale vanuit scratch
Maar de truc voor MM signaal generatie is eigenlijk gelijk als bij DCC, zorg ervoor dat de bits met correcte timing op de rails komen en zorg ervoor dat de tijd tussen de pakketten klopt...Grootste grap is MM adres, daarvoor heb ik een tabel gemaakt die een decimaal adres omzet naar MM adres... Zal wel anders (simpel) kunnen
State(assemblePacket) state = awaitPacketSent; State(awaitPacketSent){ if(newInstructionFlag) state = newPacketSent; else state = nextAddres; } State(nextAddres){ if(lastAddresFlag) state = nextPacketType; else state = assemblePacket; } State(newPacketSent){ if(newPacketSentFlag) state = assemblePacket; else state = nextPacketType; } State(nextPacketType) state = assemblePacket;
daarvoor heb ik een tabel gemaakt die een decimaal adres omzet naar MM adres... Zal wel anders (simpel) kunnen
trinary "1": a pair of long pulses ------- ------- - - 1234567812345678trinary "0": a pair of short pulses - - ------- ------- 1234567812345678en:base clock duration (locos): 26 us (microseconds) = 1/38400 (approx.)Comment: this is the clock frequency of the old 6020double frequency (solenoid and old function decoders): 76800 baudhalf clock duration (solenoid and old function decoders): 13 usbase pulse duration (locos): 8 x (base clock duration) = 208 ushalf pulse duration (solenoids): 8 x (half clock duration) = 104 usbinary "1": a long pulse