cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ 5, 3 & 1

Anonymous
Not applicable

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.

0 Likes
1 Solution
Bob_Marlowe
Expert II

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

View solution in original post

1 Reply
Bob_Marlowe
Expert II

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

View solution in original post