ArticlesBlog

SAP-1 HEX File Generation and Simulation in Proteus

SAP-1 HEX File Generation and Simulation in Proteus


Assalam O Alikum Today we’ll study Assembly Language Programming in SAP-1 How to make Machine Code How to make Intel Hex File from Machine Code and how to save Intel Hex File How to use Hex file in Proteus software for simulation First of all we will write program in Assembly Language in Column “Your Code” We know SAP-1 has 16 Bytes Memory It has 16 Locations from address 0 to F Write your code in this column Place a letter H at the end of a number to tell that it is in Hexadecimal format. You already know SAP-1 has 5 instructions, (LDA, ADD, SUB, OUT, HLT) LDA 5H means go address 5 and load data (55H) from Memory to Accumulator Your should write your code line by line in this column. To place a sample code in this column press button “Load Sample Program” The column “Machine Code” updates itself automatically This excel sheet was designed by me. The link to download this sheet is given below in description section. Machine code for Intel HEX file will also be generated automatically. To Save Hex File Press Button “Save Hex File” Now if you see Desktop you will find a file named SAP-1.hex This file has same Machine Code as it was shown in excel sheet Close MS Excel Make Circuit Diagram in Proteus You can place ROM instead of RAM In Properties Window of ROM, give path to SAP-1.hex file. This is START/STOP Circuitry. This is circuit diagram of Program Counter This 4-bit Register is Memory Address Register (MAR) Then we have 32K=4Kx8 EPROM. We will store Machine Code from HEX file to this EPROM. Here we see 8-bit Instruction Register. This is Control Matrix W Bus Output Register B Register Adder/Subtractor Accumulator Right Click on EPROM. Select Edit Properties. Tell Path (Desktop) to Intel Hex File. Now RUN the Simulation Now press START/ CLEAR Button First during simulation Final value on Output Register is 77 which is equals to 55+33-11 Thanks for Watching

Comments (2)

  1. SAP-1 Proteus Simulation Files
    https://drive.google.com/file/d/1gAa7F4bSTxk7nrawC55BJD46n5dwH3qX/view?usp=sharing

    SAP-1 Intel HEX File Generator designed in Microsoft Excel
    https://drive.google.com/file/d/1FxzwxCgyJ7-bN41DMJ0XXoUfyiE6tAmO/view?usp=sharing

Comment here