# This design has 3 states.

Can someone help me design this in logism

My design for this gas pump controller is a Mealy Machine.This design has 3 states. The only time the output will be 1, which means pumping, is in states S0 and S1. S0 is the initial state and pumping is allowed in this state. S1 is temporary shutdown and pumping is also allowed here. S3 is permanent shutdown until an “attendant” resets the machine. For the state diagram for the Mealy Machine, the assumption of having a pressure reader and we can read the pressure even if the nozzle switch is low is taken into account here. This design requires two D flip flops. There are four variables, two inputs, Nozzle and Pressure. This design is a synchronous machine and has an asynchronous output. This means that when the customer is done, he/she will turn the nozzle off, and doesn’t have to wait for two seconds (for the clock). Meaning there will be no spilling and safer for the environment.

Description of Moore Design

This design has 5 states. The only time the output will be 1, which means pumping, is in states S1 and S3. S0 is the initial state. S2 is temporary shutdown and S4 is permanent shutdown until an “attendant” resets the machine.(Note: can never go back to S0, unless from S1 or reset by “attendant”.) For the state diagram for the Moore Machine, the assumption of having a pressure reader and we can read the pressure even if the nozzle switch is low is taken into account here.This design requires three D flip flops. There are five variables, two inputs, Nozzle and Pressure. This design is a synchronous machine and has a synchronous output. This means that there maybe overflow for the customer. Meaning when the customer is done, he/she will turn the nozzle off, but he/she will have to wait for two seconds due to the clock.

Using the criteria and weighting system I picked the Mealy machine to be the best design. I pick the Mealy for many reasons. The Mealy circuit is less complicated. It has only 3 states versus the Moore’s 5 states. The mealy I designed is a synchronous machine with a synchronous output. For example, when the customer is done, he/she will not have to turn the nozzle off, it will get switched of as the pressure sensor is high. The Moore also uses a lot of hardware and is difficult to understand than Mealy is.