8051-ROM-Read
    
    This project shows the memory read operation in 8051. In this circuit the 
        contents of the memory location from 0000 to 000F is read and the value 
        displayed in the 7-Segment Display. 
 
 
    The circuit contains an 8051 chip, 7-Segment displays, Latch, Binary to 7-Segment 
        Decoder and 128K x 8-Bit CMOS One Time PROM. Ports P0 and P2 of 8051 are used 
        for memory addressing while Port P1 is used as the output port.
    
     The address of memory is send to PROM via latch from the address lines of 8051. 
         The contents of this location are read and send to the data lines. This data 
         appears at the output in 
           7-segment form.
       
 
      
    The 
   
         code editor window
     contains the source code written in either C or assembly 
        language.
     
     The program is as shown:
      
    mov r0,#0x10 ; R0 is loaded with hex value ‘10’
     mov dptr,#0x000 ; Data Pointer is loaded with ‘0000’
    $100:
     movx a,@dptr ; Content of external memory location pointed by the data 
         pointer is copied to accumulator
    mov p1,a ; Accumulator content is copied to Port P1, which is connected to 
        the display device
      mov r1,#0x0ff ; R1 is loaded with hex value ‘FF’
 
    $200: 
     djnz r1,$200 ; Decrement R1 and check whether it is equal to zero. If not, 
         jump to label ‘$200’
     inc dptr ; Increment Data Pointer
    djnz r0,$100 ; Decrement R0 and check whether it is equal to zero. If not, 
        jump to label ‘$100’
    
    
    
    
    
    
    
    
    
    
    
    The source code in the 
    code editor window 
 has to be  
    compiled 
 after making any modifications 
    (editing). 
Also the code can be 
    debugged 
 during
     simulation.