This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C51: Interfacing Flash AT29C512 with AT89C51

I am trying to interface Flash AT29C512 with AT89C51
How do read and write serially between the 8 bit 8051 and 24 bit Flash,

Kindly help if some one has worked on this.

Parents
  • sir,
    have tried at this
    just not getting data on hyperterminal
    though it is being transmitted from 8051,
    displeyed thru port-1 also,

    this is the code which i used:

    #include<reg51.h>
    #include<stdio.h>
    
    Rx();
    Tx();
    
    void main (void){
            TMOD = 0x20;
            TH1 = -3;               // 9600 baud, SMOD = 0;
            SCON = 0x50;    // 8 bit, 1 stop, REN-1
            TR1 = 1;
            TI = 0;
            Rx();
    }
    
    Rx(){
            while (1){              //(RI=1){
                    ACC = 0000;
                    ACC = SBUF;
                    P1 = ACC;
                    Tx();
                    RI = 0;
                    Rx();
            }
    }
    
    Tx(){
            // ACC = (ACC + 48);
            SBUF = ACC;
            while(TI){
                    TI = 0;
            }
    }
    
    
    

Reply
  • sir,
    have tried at this
    just not getting data on hyperterminal
    though it is being transmitted from 8051,
    displeyed thru port-1 also,

    this is the code which i used:

    #include<reg51.h>
    #include<stdio.h>
    
    Rx();
    Tx();
    
    void main (void){
            TMOD = 0x20;
            TH1 = -3;               // 9600 baud, SMOD = 0;
            SCON = 0x50;    // 8 bit, 1 stop, REN-1
            TR1 = 1;
            TI = 0;
            Rx();
    }
    
    Rx(){
            while (1){              //(RI=1){
                    ACC = 0000;
                    ACC = SBUF;
                    P1 = ACC;
                    Tx();
                    RI = 0;
                    Rx();
            }
    }
    
    Tx(){
            // ACC = (ACC + 48);
            SBUF = ACC;
            while(TI){
                    TI = 0;
            }
    }
    
    
    

Children