I'm not trying to offend you but sometimes people misinterprete the meaning of MOSI and MISO with something like Serial In (MOSI) and Serial Out (MISO). So they connect MOSI to SDO and MISO to SDI. But that's not correct. MOSI actually means "Master Out Slave In" and should be connected to SDI (LPC1768 is the master) and correspondingly MISO (Master In Slave Out) to SDO.
Probably that's not your problem but it's still worth checking.
Best regards
Neni
LOL! Not offended in the LEAST! I was having issues communicating with my L6472 board (own design, dual L6472 and MCU to control them) and had checked just about everything, from the pin outs of the package in Eagle, ohmed everything out, verified power,enable,etc. and STILL couldn't get anything to work. It always set the error flag as soon as I tried to talk to either driver.
When I saw your post, I went back and looked over the schematic one more time. Sure enough, I CLEARLY had MOSI -> MISO!!! And the whole point of "MOSI" vs. "TXD" or "MISO" vs. "RXD" was so you didn't have to remember to swap TXD to RXD! And I did it anyway!
Thanks for the mental jab! A quick patch on the PCB and everything is talking and working as expected.
Hi,
I try to interface a L6470 stepper driver (dSPIN) from SparkFun via the mbed SPI with the following code:
Sadly I got only zero's from the dSPIN - and I realy don't know why cause I can't find any mistake in my code.
I hope someone could help me.
Best regards