as far as i remember toggles using xor out of contacts and
coils behaves slightly diferently from built in xor instruction.
version using ote coils gets reset on powerup which might be
desirable sometimes but this is not always the case.
using logic with latches can address this issue.
it's good to see so many flip flop variations and programming
styles but when it comes to this problem i'm sold on word level xor.
nothing beats it's simplicity and efficiency - single rung with three
instructions and you get 16 or 32 toggles. all of this with just one
auxilary bit wasted.
just one extra rung to selectivly reset some or all of them on powerup if needed.
no lengthy code, timers or counters... bunch of toggles with three
instructions in one rung.
i know that this was intended for newcomers because this topic
returns like clockwork. which is somewhat annoying. let's make it interesting.
what is one toggle after all? most equipment these days has tons of
functionality. let's start another tread with chalenge:
who can write most efficient logic for 100 or 1000 toggles?
i like tidbits, let's do something creative and achive more
using little, not achive little with a lot.