I am attaching my code for running stepper motor ,could you please tell me is there any mistake in it.With this program my motor is not working.
int SPItransfer(uint_8 Data)
{
SPI_WriteTxData(Data);
SPI_ReadRxData();
return Data;
}
This will not work, you need to wait until the data transfer has completed before reading the result.
Bob