SPI-with MCP2510-problem.

Discussion in 'Embedded Systems and Microcontrollers' started by M0sTaFa, Apr 13, 2011.

  1. M0sTaFa

    Thread Starter New Member

    Dec 10, 2010
    4
    0
    i want to talk with the MCP2510 using SPI
    the pic(pic16f877) is a master.
    when reading from the MCP we do the following.

    spi_write(0x02); //read instruction
    delay_ms(1);
    spi_write(0x0f);//add of mode select reg
    delay_ms(1);
    x=spi_read();

    what i need to know is:
    1- does the delay affect the process?
    2- if yes what is the right way to read from the MCP.

    thanks
     
Loading...