Tell me more ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

How does a latch get its initial state? I'm guessing that it depends on race conditions and which ever condition comes first then that is the state that the latch starts off with.

share|improve this question
3  
Headline question is too broad to generate a single answer, so its probably not a good fit for this site. Your (valid) technical question is pretty much a duplicate of another question from earlier today: electronics.stackexchange.com/questions/25581/… – The Photon Jan 25 '12 at 2:48
Yeah, but the answers to that question weren't really as informative as the ones below and I'm not sure too many questions have a single answer which is evidenced partially by having a site like this in the first place. I agree though that this might be a bit too broad but with all the other helpful broad questions on these sites I thought it might be best to post this question for both others and I. – Lightyear Buzz Jan 25 '12 at 3:02
1  
If you edit the question to just include the technical part (2nd paragraph), I'll remove my downvote. – The Photon Jan 25 '12 at 3:05
3  
Enough to re-teach themselves a forgotten concept quickly. Or to teach themselves a new concept in the same way. Unless a paradigm shift occurs, fundamentals are relevant, and most (practical) shifts in technology are marginal enough to keep up with. – Jon L Jan 25 '12 at 7:29
There is no right answer to this question. If the community really wants this question left open, then it should at least be community wiki. – Kellenjb Jan 25 '12 at 12:33
show 1 more comment

4 Answers

up vote 17 down vote accepted

There is certainly a lot of stuff taught in school that is not required in the job market. And, of course, there is a lot that is not taught that should be. This could probably be said about any job market, since it depends on what specialty the person ends up being employed in. Unfortunately for you, neither your professors or I can tell you what you will and will not use once you get a real job in your field.

For example, I don't use calculus in my job as an E.E.. But a coworker, who is also technically an E.E., uses calculus almost daily. I design PCB's and FPGA's, while he writes DSP algorithms. There was no way our teachers could have ever known what we needed to get the job done.

That being said... Your question to your teacher, about the initial value of the latch or Flip Flop (FF), was a great question and the way your professor responded shows her ignorance of the requirements for designing practical digital logic circuits.

Simply put, the initial value of a Latch or FF is indeterminate. Meaning, it will have an initial value but you won't know what it is in advance. A given latch/FF might even have different initial values from one power-up to the next. Sometimes it'll be a '0', other times a '1'. Things like temperature and how fast the power rails ramp up will effect the initial value.

If your circuit requires a known initial value then you must force the value. Normally this is done using some sort of set/reset/clear input that is driven by a reset signal. This is also why almost any digital circuit of reasonable complexity has a reset signal. Reset signals are not just for CPU's.

share|improve this answer
+1, very well worded! – avakar Jan 25 '12 at 7:45
3  
In my studies I learned a lot of stuff that did not stricly need lateron in my professional life, but was still very usefull for me. An important part of an education is 'learning to learn'. – Wouter van Ooijen Jan 25 '12 at 8:21
2  
You never know what you're going to need to know. I got my EE degree way back in the 1960's. I remember taking courses like microwave radio, and at the time thinking I'm going to be working with digital systems and never going to use any of this stuff (at the time, microwave was mostly used by the telephone company for long distance radio relays). Now, 40+ years later, I'm working on embedded systems, everything's wireless, and I'm laying out microstrip antennas on a PCB. – tcrosley Jan 25 '12 at 9:49
1  
@davidKessner, I thought in some of the race condition latches it really mattered how your power rail charged. A very fast charge could lead to one thing, while a slow charge another, but you needed a very good quality characterization of your gates. This alone would make the process a bit worthless for any real device where a reset pin works easily, with little design and low complexity. – Kortuk Jan 25 '12 at 18:41

If you mean at turn on (before reset), then it's pretty much as you say - the gates in the FF will not be perfectly symmetrical so one will "win" the race and the latch will head towards that state. Which state it will be is unpredictable.

It's a bit like if you balance a ball at the top of a pointy house roof - in theory if everything was perfectly still, it should stay there. In practice it will always roll off to one side or the other.

So this is why on turn on, most digital circuits need to be reset to a known state (where it's necessary for the state to be known initially, you mat leave some registers undefined/unused until thy are written to the first time)

share|improve this answer

I guess it depends on what latch you are talking about.

http://en.wikipedia.org/wiki/Latch_%28electronics%29

Some of the latches can be reset, so you know where you begin with. I also think she was just trying to demonstrate the concept of "unchanged"/"keep" state, it does not really matter what the previous state is.

share|improve this answer

Two brief things: for the first question, I'm still a student, I'm doing an internship in a company and I found that many concepts, even some that I considered less important, are useful, and you will complain when you won't know well these notions because you had a bad teacher. (I know that it may seem trivial, but it's the first impression I had when I got to the real world)

For the second question, I would just add my point of view: latches and FFs are meant to hold values, and they have sense if you give that value first (unless you want to create a somehow random generator). So, with reset or putting a value, the first step is always the input.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.