# RTL State machine design help

Status
Not open for further replies.

#### Sistar

##### Newbie level 2
Here is a interview question and I am not sure about the answer. I hope some one can help me to solve it.

To enter the office people have to pass through the corridor. Once someone gets into the office the light turns on. It goes off when noone is present in the room. There are two registration sensors in the corridor. Build a state machine diagram and design a circuit to control the light

#### ThisIsNotSam

Here is a interview question and I am not sure about the answer. I hope some one can help me to solve it.

To enter the office people have to pass through the corridor. Once someone gets into the office the light turns on. It goes off when noone is present in the room. There are two registration sensors in the corridor. Build a state machine diagram and design a circuit to control the light

View attachment 131603

This looks trivial. By the sensor order you know if someone entered or left the room. use that with some counters and you know how many are inside at any given time. light goes off is the counter is zero. Am I missing something? Is this the whole problem?

##### Super Moderator
Staff member
Am I missing something? Is this the whole problem?
Yeah, are two people allowed to walk in/out side by side, so they are detected as one person? ;-)

#### ThisIsNotSam

Yeah, are two people allowed to walk in/out side by side, so they are detected as one person? ;-)

*the plot thickens*

#### dpaul

In my opinion the OP has not provided all the conditions.

OP: Have you tried to sketch a state diagram? Show us what you have understood and done!

##### Super Moderator
Staff member
In my opinion the OP has not provided all the conditions.

OP: Have you tried to sketch a state diagram? Show us what you have understood and done!

IMO they already flunked the interview...if I gave someone a "take home" or set of pre-interview questions I would probably come on here and check if they asked for help on those questions....

#### Sistar

##### Newbie level 2
Just assume that only one person will pass the sensor at a time

#### ThisIsNotSam

Just assume that only one person will pass the sensor at a time

check my earlier reply. that is all it takes. very very easy solution.

#### dpaul

check my earlier reply. that is all it takes. very very easy solution.

Perhaps the OP desires to have the entire SM bubble-diagram to be provided to him!
Till now he hasn't replied about his own understanding or his line of thoughts to solve the problem.

##### Super Moderator
Staff member
Perhaps the OP desires to have the entire SM bubble-diagram to be provided to him!
Till now he hasn't replied about his own understanding or his line of thoughts to solve the problem.

Hence my statement in post #6
IMO they already flunked the interview

Status
Not open for further replies.