Page 1 of 1

SR-Latch with Enable/Disable v1.0

PostPosted: Sat May 16, 2020 1:28 pm
by tiffy
If the SR-Latch is Enabled input (E=1) it will pay attention to its two Inputs (SR), or if Disabled input (E=0) it stays Latched (i.e. with Output Q = 0 or 1) regardless of what happens to the two Inputs (SR).

Help file included inside the Schematic.

Made Schematic with Flowstone v3.0.8.1 Skylark.

Re: SR-Latch with Enable v1.0

PostPosted: Sat May 16, 2020 2:01 pm
by tektoog
Hey tiffy,
Cool module!
Maybe it could also be called "True One Click"...
I guess it works like this: first reset, then enable and then trigger or set.
The purpose being to let the trigger pass only if it's been allowed by the enable function?
If it's the case I think I spotted a "bug" that could be very annoying in a plugin built for example...
Your reset function also sends a trigger... which I guess, should not be allowed because the enable function has been triggered already... ;)
Also, for a better adaptability in schematics and ease of use I would put the reset and enable function with the same trigger: trigger order being first reset then enable.
Doing this shows clearly the trigger sent by the reset which I believe, should not be there... ;)

SR-Latch with Enable v1.0-Bug-Spotted-TekTooG.fsm
This version doesn't fix the problem I mentionned... it just highlights it!
(1.34 KiB) Downloaded 838 times


To avoid this problem, I would use one of the module I made and posted a while ago in a collection of modules called trigger blockers...

Let me know what you think ;)
Take care,
TekTooG

Re: SR-Latch with Enable v1.0

PostPosted: Sat May 16, 2020 3:22 pm
by tiffy
tektoog wrote:Hey tiffy,
Cool module!
Maybe it could also be called "True One Click"...
I guess it works like this: first reset, then enable and then trigger or set.
The purpose being to let the trigger pass only if it's been allowed by the enable function?
If it's the case I think I spotted a "bug" that could be very annoying in a plugin built for example...
Your reset function also sends a trigger... which I guess, should not be allowed because the enable function has been triggered already... ;)

Let me know what you think ;)
Take care,
TekTooG


Hi Tektoog, thanks for your version of the Latch...however, your version defeat the whole purpose of the Enable/Disable Input (E) of the Latch.

However it is not a bug in my version of the Latch. Sorry, I was a bit lazy to give a long description but here goes.

The output of the latch is a "Boolean" pulse with a "rising edge" when the output switches On and a "falling edge" when the output switches Off and therefore it will have two triggers, that is one for the rising edge (Set) and one for the falling edge (Reset).

The idea of the Enable/Disable terminal is to disable (or enable) the Latch so that neither the Set (S) input terminal or the Reset (R) input terminal have any effect on the state of the output terminal Q when the Latch is disabled i.e. Enable /Disable terminal made Low or 0.

When you make the Enable/Disable terminal High or 1 the Latch is again Enabled and then both the Set (S) and Reset (R) inputs can then change the Output state Q of the Latch i.e. make it either High (1) or Low (0).

However, the Enable/Disable Input terminal of the Latch should not provide a trigger at the Q Output terminal of the Latch which was indeed the case.

I probably should have called it "Latch with Enable/Disable" terminal "E" or "Gated SR Latch".

Hope the additional description helps to clear up the misunderstanding.

regards.

Re: SR-Latch with Enable/Disable v1.0

PostPosted: Sat May 16, 2020 3:40 pm
by tektoog
hey,
tiffy wrote:however, your version defeat the whole purpose of the Enable/Disable Input (E) of the Latch.

Yes, I didn't get at first what the module was supposed to do... I focused on triggers as they're a real nightmare when you built a full plug... at least for me... they became a real obsession ;)
Your additional comment made it much clearer for me, and so, yes, it behaves the way you said so...
My bad! ;)
Useful , and functional stuff anyway ;) :)
Good job!

Re: SR-Latch with Enable/Disable v1.0

PostPosted: Sun May 17, 2020 1:05 am
by tiffy
tektoog wrote:hey,
[quote=... I focused on triggers as they're a real nightmare when you built a full plug... at least for me... they became a real obsession ;)


I know, when I first started using Flowstone I was not aware of that problem :oops: but it is thanks to Tulamide some time in the past who focused my attention to the importance of triggers in a schematic :) ...I wish I knew that right from the beginning as it would have made my task much easier with many of my own schematics. That is why I now check my schematics by means of the Trigger Counter which is a great help in detecting stray triggers :idea: .

Re: SR-Latch with Enable/Disable v1.0

PostPosted: Fri May 22, 2020 8:40 pm
by tiffy
This version v1.1 has less components than the previous v1.0

Re: SR-Latch with Enable/Disable v1.0

PostPosted: Fri May 22, 2020 10:49 pm
by RJHollins
This one is not working as well Tiffy ...

Re: SR-Latch with Enable/Disable v1.0

PostPosted: Sat May 23, 2020 10:39 am
by tiffy
RJHollins wrote:This one is not working as well Tiffy ...


Hi Mr. Hollins, what is wrong with v1.1 as I just tested it again on my side and all looks in order? Did you first click once on the Enable/Disable button prior to clicking with the mouse on Set or/and Reset? Please let me know.

This Schematic was also made with Flowstone v3.0.8.1 Skylark.

Re: SR-Latch with Enable/Disable v1.0

PostPosted: Sat May 23, 2020 5:26 pm
by RJHollins
tiffy wrote:
RJHollins wrote:This one is not working as well Tiffy ...


Hi Mr. Hollins, what is wrong with v1.1 as I just tested it again on my side and all looks in order? Did you first click once on the Enable/Disable button prior to clicking with the mouse on Set or/and Reset? Please let me know.

This Schematic was also made with Flowstone v3.0.8.1 Skylark.

Apologies Tiffy ... followed the mentioned sequence, and yes, it is working.

also added this info as a note in Schematic.

Another one for the Toolbox. Thanks Tiffy !