Jump to content
  • 0

Digilent Analog Discovery 2 . Waveforms . SPI I2C UART Javascript ,Python . SPI & I2C not working


SIB-V2

Question

Dear Attila

Please find enclosed the following . This took more than 4 hours to prepare all the documentation please treat as such. 

I am using the latest version of Digilent Waveforms and the latest Waveforms SDK.

- Master Javascript driver for Digilent Analogue Discover AD2 which can be used inside Waveforms
-        SPI Setup , read & write & Initialise (1) . Status NOT Working . Needs Digilent Help to fix (%%)
-        I2C Setup , read & write & Initialise (2) . Status NOT Working . Needs Digilent Help to fix
-        UART Setup , read & write & Initialise(3) .  **
-        GPIO Setup,  Set individual GPIO Pin Output States (4)  Working 
-         PSU Control, Set PSU voltage , turn on and off (5)  Working

- Python driver directly to control ON-SEMI CAT9532 using Digilent Analogue Discover AD2 & Digilent Waveforms

## Enclosed are all the attached scripts . 

** Mostly likely works as driver details taken from working examples . See driver for while for web links 
   reference. 

(%%)  See previous efforts here to get it working 
   https://forum.digilentinc.com/topic/21997-waveforms-with-accelerometer-digilent-analog-discovery-2-with-pmod-acl2-java-script-spi/#comment-63633
   https://forum.digilentinc.com/topic/19237-waveforms-with-accelerometer/page/2/#comment-52495
        
        

I am trying to get the I2C driver function of the AD2 to work to drive a  ON-SEMI CAT9532 LED driver.

Set up , I have two Digilent Analogue Discover AD2

    - Device 1  :  Digilent AD2 (Device A)  I2C driver source  . 
                    A) Device is programed using Digilent Waveforms Javascript
                    B) Direct control though Digilent Waveforms I2C Master interface
                    C) Direct control though Digilent Waveforms I2C Master script interface
                    D) Direct control Waveforms SDK & Python 
    
    - Device 2  :  Dilenet AD2 (Device B) as I2C spy device 
    
    - Device 3  :  TotalPhase Advark I2C/SPI professional I2C development tool 
                Direct control & Programming by XML program script.
               https://www.totalphase.com/products/aardvark-i2cspi/

I own (2) two Analogue Discovery devices.
    
What worked

    Device 2 :   It could work perfectly as a I2C spy mode device 
    
    Device 3:    Worked perfectly straight out of the box using the GUI interface. Took 20 mins to have working solution.                                                           This is professional I2C product that has been in the market for 10 years plus.
    
What failed 

    Device 1:   Did not output the correct I2C packet no mater how it was programmed.
                Device 1 :  Had 10K pull up resistor attached to the VCC 3V3 rail 
                on the  I2C: SDA  &  I2C:SCL  & I2C:/RESET.
                
Conclusion 

    There seems to be general issue with the AD2 and getting it to work as driver 
    for I2C and SPI . Which is a long term issue.
    
    I have spent a long time searching for all the small details to build up the driver
    set so that should work with Digilent Analogue Discover AD2 & Digilent Waveforms
    but if the hardware of the AD2 is not co-operative or the staff in Digilent not 
    being supportive there is only so much I can do .

Requested Help

1.  Fix the Waveforms AD2 Javascript and Python Waveforms SDK so it works for SPI & I2C . There is something missing here,
    where it would be good to fix to improved your AD2 products for the whole community 
    of AD2 users
    
2.   Have a Digilent published AD2 drivers that work for SPI & I2C & UART & GPIO & PSU control for waveforms and waveforms SDK. 

 

So Attila the case is in your lap now .. 

Please put some effort in to fix it or show me how to fix it .

I have the feeling your quite a skilled person. 

The result should be posted here as a product example :   https://projects.digilentinc.com/products/waveforms?sort=updated

Background 

I am a electronic engineer with 20+ years development experience , I have have successfully 
used Digilent AD2 to design 3 products end to end and have been using it for quite a few
years.  I can program in Python , Microsoft VB.net and Javascript.

I have personally purchased two pieces of AD2 out of my own money as feel they are such a 
good tool.  I am committed to using the AD2 as I can see and experience that it is a 
super swiss army knife for use in a development  of embedded electronics.

I have also purchased a full profesional copy of National instruments Labview for use with AD2 but , 
have suspended learning to use labview until this I2C & SPI issue is resolved with the AD2 

Digilent_AD2_Script_I2C_control_of_on-semi_CAT9532.py Digilent_AD2_Script_I2C_control_of_on-semi_CAT9532.js Digilent_AD2_Script_I2C_control_of_on-semi_CAT9532.dwf3work Digilent_AD2_Script_master.js

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Hi Attila ,

Is there any chance we can work together to get the SPI part of the driver fixed .  Then all there will be a javascript driver for all the embedded protocols 

SPI , I2C and UART  together with power control.

What are your thoughts ??

 

Best wishes & friendly greetings

SIB

 

Link to comment
Share on other sites

  • 0

Hi Attila ,   

Any thoughts on my request ... 

If not you then can you put me in contact with one of your colleagues who would be the correct person to chat too.

When your colleagues are back in the office in the USA from covid work at home I will call them to find some one to help me .. 

I would prefer i am pointed at the correct person rather than calling around to find the correct person.

Fully the case can be solved.. 

Best wishes

SIB 

Link to comment
Share on other sites

  • 0

Hi @SIB-V2

I really would like to help you but I can't debug the script since I don't have the driver you use.

You should use your second AD2 as Logic Analyzer to see if the first AD2 with the script generates the expected signals.

It would be great if you could point out what it is not working, I may be able to help you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...