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

prob. in interfacing ds1230 with 8051

hello sir,
i m trying to interface ds1230 SRAM with 8051. bur i m not able to take out put.....pls help me..how to start with thi device to get out put...

Parents
  • sir i had spent almost 10 days for this....and still conti. but even still i m not able to get out output...here is my code... currently i m not using latch...i m directly connect the add. & data pin with 8051...

    void ds1230_delay()
    { unsigned char i; for(i = 0; i <= 2; i++);
    }

    void ds1230_write(unsigned char ltemp ,unsigned char htemp)
    {

    CE = 1; WE = 1;

    ladd = ltemp; hadd = htemp; ds1230_delay(); io_data = 0xFF;

    CE = 0; WE = 0;

    ds1230_delay(); ds1230_delay();

    CE = 1; WE = 1;

    }

    void ds1230_read(unsigned char Rltemp ,unsigned char Rhtemp)
    {

    unsigned char data_out;

    CE = 0; OE = 0;

    ladd = Rltemp; hadd = Rhtemp; ds1230_delay(); data_out = io_data; transmit(data_out );

    CE = 1; OE = 1;

    }

    void main()
    { init_serial(); //serial initialitation ds1230_write(0x00,0xF0); io_data = 0x00; while(1) {

    ds1230_read(0x00,0xF0);

    }

    }

Reply
  • sir i had spent almost 10 days for this....and still conti. but even still i m not able to get out output...here is my code... currently i m not using latch...i m directly connect the add. & data pin with 8051...

    void ds1230_delay()
    { unsigned char i; for(i = 0; i <= 2; i++);
    }

    void ds1230_write(unsigned char ltemp ,unsigned char htemp)
    {

    CE = 1; WE = 1;

    ladd = ltemp; hadd = htemp; ds1230_delay(); io_data = 0xFF;

    CE = 0; WE = 0;

    ds1230_delay(); ds1230_delay();

    CE = 1; WE = 1;

    }

    void ds1230_read(unsigned char Rltemp ,unsigned char Rhtemp)
    {

    unsigned char data_out;

    CE = 0; OE = 0;

    ladd = Rltemp; hadd = Rhtemp; ds1230_delay(); data_out = io_data; transmit(data_out );

    CE = 1; OE = 1;

    }

    void main()
    { init_serial(); //serial initialitation ds1230_write(0x00,0xF0); io_data = 0x00; while(1) {

    ds1230_read(0x00,0xF0);

    }

    }

Children
No data