fkl
Joined: 20 Nov 2010 Posts: 44
|
spi MISO - no exchange of data |
Posted: Fri Sep 27, 2013 11:03 am |
|
|
Please help.
chip pic24fj064gb106
Code: |
#pin_select SCK1OUT=PIN_B1
#pin_select SDI=PIN_B0
#pin_select SDO=PIN_B2
#use spi (MASTER, SPI1, MODE=0, BITS=8, ENABLE=PIN9, STREAM=SPI_PORT1_0, FORCE_HW)
...
main()
{
...
spi_init(SPI_PORT1_0, 1000000);
...
spi_write(0x05);
data_in=spi_read(0);// data_in<=0xFF
...
}
|
On MOSI - is exchanged of data.
MISO - no exchange of data (line always high).
Checked using a logic analyzer.
Where is the error? |
|