8-bit PN Sequence Generator

  1. Select the Update Frequency in Hz; it is simply the sequence speed.

  2. Click View Circuit Diagram to see how the 8051 and LEDs are connected in the logic diagram and block diagram.

  3. Click View Assembly Code to analyse the assembly code used for this experiment.

  4. According to your analysis, write your code in the Assembly Code Editor.

  5. Click Check Code to verify your program against the given code.

    Note:

    • If correct → a success message will appear and Start Simulation will be enabled.
    • If incorrect → you’ll be asked to review and correct your program.
  6. (Optional) You can directly copy code into the editor by clicking on Use Code in the View Assembly Code popup.

  7. After validation, click Start Simulation to run the simulation.

  8. The outputs of flip-flops 8, 6, 5, 4 are XORed together, so the polynomial used is
    x⁸ + x⁶ + x⁵ + x⁴ + 1.
    Seed is given at P1.0 as 1; remaining bits are 0.

  9. Observe the LED pattern and PN sequence graph and table.

  10. If you want to save your program, click Download Code. It will be stored as pn_sequence_code.asm.

  11. If you want to save the generated waveform, click Download Graph. It will be stored as pn_sequence_chart.png.

  12. If you want to save the generated table, click Download Table. It will be stored as pn_sequence_code.csv.

  13. Click Reset Simulation to stop the simulation, clear the editor, and reset everything to default.