<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[CANNY logic forum — More Elegant latch]]></title>
	<link rel="self" href="https://forum.cannylogic.com/extern.php?action=feed&amp;tid=41&amp;type=atom" />
	<updated>2021-07-22T09:58:44Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.cannylogic.com/viewtopic.php?id=41</id>
		<entry>
			<title type="html"><![CDATA[Re: More Elegant latch]]></title>
			<link rel="alternate" href="https://forum.cannylogic.com/viewtopic.php?pid=923#p923" />
			<content type="html"><![CDATA[<p>Please see attachment with another variant of possible solution.</p><p>Also, it is highly possible that only single of a couple of bits of the register D5:D4 is responsible for the state of this switch button, not all 16 bits of D5:D4. If so, you better find this bit. Since other bites in D5:D4 may be influenced by the state of other buttons or vehicle systems the diagram may stops working in a different buttons or vehicle systems state.</p>]]></content>
			<author>
				<name><![CDATA[Konstantin, CANNY logic]]></name>
				<uri>https://forum.cannylogic.com/profile.php?id=2</uri>
			</author>
			<updated>2021-07-22T09:58:44Z</updated>
			<id>https://forum.cannylogic.com/viewtopic.php?pid=923#p923</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: More Elegant latch]]></title>
			<link rel="alternate" href="https://forum.cannylogic.com/viewtopic.php?pid=922#p922" />
			<content type="html"><![CDATA[<p>The section in orange is the best I could do.&nbsp; I used a PWM to pulse a &quot;reset&quot; to the flip-flop when input A=0</p>]]></content>
			<author>
				<name><![CDATA[mlrtime99]]></name>
				<uri>https://forum.cannylogic.com/profile.php?id=285</uri>
			</author>
			<updated>2021-07-17T20:42:08Z</updated>
			<id>https://forum.cannylogic.com/viewtopic.php?pid=922#p922</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[More Elegant latch]]></title>
			<link rel="alternate" href="https://forum.cannylogic.com/viewtopic.php?pid=921#p921" />
			<content type="html"><![CDATA[<p>I&#039;m very new to FBD and while I&#039;m able to achieve the results I want I feel like my program is far from optimized.</p><p>I have two inputs:<br />Input A has a value of 0/1<br />Input B has a value of 0/1</p><p>Input A is a user operated switch (1 = Switch ON)<br />Input B will fluctuate between 0/1 based on the speed of the vehicle (if &gt; 40kmh, B=1)</p><p>What I&#039;d like:<br />Scenario 1) A=0 and B=0 output=0<br />Scenario 2) A=0 and B=1 output=0<br />Scenario 3) A=1 and B=0 output=0<br />Scenario 4) A=1 and B=1 output=1 and output will stay 1 regardless of the state of B until A=0.</p><p>These seems like an ideal fit for a latch and D flip-flop satisfies scenarios 1, 2, 3, and half of 4.&nbsp; When B becomes 1, A will be forwarded to the output which becomes 1, it will however not set the output to 0 when A=0 and B becomes 0.</p><p>I&#039;m currently building a nested logical and relational operators loop but feel like there has to be a better way.&nbsp; Any suggestions?</p>]]></content>
			<author>
				<name><![CDATA[mlrtime99]]></name>
				<uri>https://forum.cannylogic.com/profile.php?id=285</uri>
			</author>
			<updated>2021-07-17T18:48:00Z</updated>
			<id>https://forum.cannylogic.com/viewtopic.php?pid=921#p921</id>
		</entry>
</feed>
