LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

SPI and LIFA

Hi, I have started a small project with the L6470 Step motor driver and Arduino UNO. But it does not work as expected. The code are like this:

Udklip.PNG

The firste question is:

Even with no SPI device connected, "SPI send recive" returns data other than zeros. But pin 12 MISO are always low. Can you tell why?

Next, with the L6470 chip connected, "SPI send recive" still retuns data even though the MISO atill are low at all time.

My last problem (for the time being) is the L6470 does not respond. With a scope connected I have verified the timing of /CS (chip select) and MOSI and the data at MOSI. It all looks good. But the L6470 does not reply with data at MISO. does anyone have experience using this chip?

Thanks in advance, Anders

0 Kudos
Message 1 of 5
(4,917 Views)

anders_dk wrote:

Even with no SPI device connected, "SPI send recive" returns data other than zeros. But pin 12 MISO are always low. Can you tell why?

When there is nothing connected to the pins they are floating and they might be high or low or randomly switch, in my experience.

0 Kudos
Message 2 of 5
(3,204 Views)

Sorry i did not write all details. Whit no device the data pin pulled down by a 10k resistor. And i have verified with the scope, the pin is low at all clocks....

0 Kudos
Message 3 of 5
(3,204 Views)

At current moment I debug dSPIN for LIFA VIs (toolkit). Based on function from https://www.sparkfun.com/products/10859 Arduino sketch.

dSPIN1.png

Message 4 of 5
(3,204 Views)

Hi Chupakabra

It looks very good, how far are you? have you tested it on hardware?

I would be very happy with a copy of your code.

0 Kudos
Message 5 of 5
(3,204 Views)