Aim: Simulate a parallel port printer.
Objectives:
· Learn to represent state machines with diagram
· Understand different types of state machines
· Learn different ways of writing VHDL code for state machines
Approach: The first thing to do in tackling this problem was to identify the different states that the printer can assume as parallel port. Identifying these states depends on the protocols of the parallel port printer. Next was to identify the different inputs and outputs that were relevant to simulating the parallel port printer. After identifying all the relevant states of the printer, the inputs and outputs, I sought to write the VHDL code to simulate it. The VHDL code mainly made use of case statements and if statements. After putting together the code, a test bench was generated to test and run the simulation.
Result: The initial results from the test bench were not desirable as some of the processes were not well synchronized. I sought to debug the code to fish out any errors or find out what was no being done right. After massaging the code or debugging it, I was able to synchronize the parallel port printing protocol
Challenges: The major challenge faced when working on this project to be able to write a test bench code to simulate the code. Another challenge was to able to identify each state of the parallel printer and vary the inputs and output data to replicate the way the protocol works.
State diagram for a printer parallel port interface
Wave Diagram for Parallel port printer.