LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

SPI Port examples

Hi, I  have a ADSP-BF537 EZ-KIT Lite and I want program a tranceivers (CC1020 from Chipcon) using the SPI Port. I was looking for some example of SPI port but I don't find nothing about the subject.  I am trying to learn by myself but I have several question, for example, The BF device Initialize Buffer VI, I don't understand about buffers parameter setting. Is this buffer  similar to data receive and transmit buffer of processor? Please help me because I am lost in the space......!Smiley Sad
Message 1 of 7
(9,462 Views)
Hi,

The AD7476A uses SPI, and I have attached some VIs that can be used to test this driver. Reference this KnowledgeBase article for more information. Hopefully this will help get you started. I recommend that you use Analog Devices' System Services Documentation as a reference.
--
Michael P
National Instruments
0 Kudos
Message 2 of 7
(9,457 Views)
Do you need bi-directional SPI?  We have some fixes associated with it if you need it.
-erik
0 Kudos
Message 3 of 7
(9,415 Views)

can someone look at michael's code please?

I can't get dataready to go TRUE, I think the buffer doesn't get full and don't call de callback.vi, why?

thanks in advance

António Veríssimo de Freitas
Universidade de Aveiro Student
0 Kudos
Message 4 of 7
(7,375 Views)

I am on and off working of a SPI driver for the AD7476A on the BF548.  The first thing you want to do is verify that the clock is working by monitoring it with a scope when you perform a SPI transaction.  If you don't see a clock, then you have the wrong port selected.  Also, check the MOSI or MISO is setup properly in the code (sorry for the lack of detail, I am going off the top of my head), you should be setup MISO (Master Input Slave Output).

 

After that, there are a bunch of parameters that need to be verified to match your situation.  I would put up an example of my driver, but it is a work in process.  I can do three quierries, then it crashes.  So I am in the stage of verifying all the setup parameters.  Also, there is a decent explanation of each parameter in the help files!

 

Hope this helps...

Joe

0 Kudos
Message 5 of 7
(7,365 Views)

Hi:

 

The I/O Analog Read (AD7476) from the Blackfin Pallete works great..

I'm going to use that as a base for my work, my question now is, I want to get the buffer full (imagine 1024 samples) and then call a VI that process all the data..

Do I use the AD7476A open callback VI ?

Best regards

António Veríssimo de Freitas
Universidade de Aveiro Student
0 Kudos
Message 6 of 7
(7,340 Views)

Hi, Michael P.

 

You code works fine, except for the sub-buffers..

One question, I need to use several ADC's 7476A... how do i use it?

I know the lines are shared (SCLK, MISO and MOSI) but how do I change between ADC's?

I just use digital ouputs to change CS, or is there other way to do it? I know there is a SPI vi that has an input as the port number, is this the better way?

Thanks,

 

António Veríssimo de Freitas

António Veríssimo de Freitas
Universidade de Aveiro Student
0 Kudos
Message 7 of 7
(7,157 Views)