Mayhew Labs Extended ADC Shield | Arduino Compatible Compiler for LabVIEW Discussions | Forum


Please consider registering

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 4 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Mayhew Labs Extended ADC Shield
March 1, 2017
1:53 pm
Forum Posts: 7
Member Since:
August 1, 2016
sp_UserOfflineSmall Offline

Ok so this is going to be a long thread, I think.  I purchased a Mayhew Labs Extended ADC shield and I am using on an Arduino Due.  They supply Arduino Libraries with it and they work great.  I am trying to replicate the Arduino using the Arduino library but it is not working.  There are some special notes about using the DUE with this shield but I think I should be ok.  I am using Labview 2016.Arduino-Waveform.jpgImage EnlargerLabview-Waveform.jpgImage Enlarger


I have attached screenshots from the oscilloscope I have monitoring the SPI, CS, and RD pins.  When I use the Arduino Library I get a response from the MISO line but I do not get that response when I use the Labview vi's.  What could I be doing wrong?  


It should be noted that I have to manually pulse pin 8, the CS pin because the SPI Transfer vi does not do so.  I have attached my code, the Arduino library, and the screenshots from my scope.  

March 3, 2017
6:07 pm
Forum Posts: 304
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

As explained in a previous post, for the Due, you cannot use pin 8 because the peripheral directly controls the CS and there are designated CS pins.  See here and Connections Table here.  The user manual for your shield says to use pin 10, which I believe is the default CS pin for the Due, not pin 8.

As for your issue, could you save your VI for 2015 and I will take a look?  There are some details in the description of this shield.  You have not specified if you are using CONVST.  If this is connected, it could be that the library is using this to start a conversion but your VI is not. If you take a look at the library for the shield, it is toggling this high to low to start a conversion.  Otherwise, your SPI timings look ok.

Another thing to consider is that it is usually a better approach to create a custom wrapper for a specific library then recreating the low level SPI interface.  Since you already have a working Arduino library, all you have to do is create a custom addon that wraps this library and you would just create wrapper VIs for the needed Arduino functions.  There is an example of how to do this that ships with the Compiler (see Digilent Analog Shield) and there is a step by step guide in the user manual.

Forum Timezone: UTC 0

Most Users Ever Online: 33

Currently Online:
5 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

John: 18


Dan6077: 11

Member Stats:

Guest Posters: 0

Members: 80

Moderators: 0

Admins: 3

Forum Stats:

Groups: 1

Forums: 2

Topics: 58

Posts: 289

Newest Members: Geraldkix, ThomasSoogs, Angelvor, AngelaMuh, Nsneilohone

Administrators: geadmin: 5, filipealtoe: 35, Steffan: 89