AD75019 16x16 crosspoint switch/multiplexer cannot communicate via SPI

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
gratefulfrog
Posts: 149
Joined: Sun Mar 01, 2015 12:10 pm

AD75019 16x16 crosspoint switch/multiplexer cannot communicate via SPI

Post by gratefulfrog » Mon Feb 12, 2018 8:13 am

HI guys!

I am trying desperately to get the AD75019 analog crosspoint switch to respond to bit vectors sent via SPI from a Pyboard but for the life of me I can not get it to do anything it should.

The datasheet is here: http://www.analog.com/media/en/technica ... D75019.pdf

My wiring is:
AD75019 pin : Function
1 : pboard pin X5 SS
2 : pboard pin X6 SPI CLK
3 : pboard pin X8 SPI MOSI
4 : -12v + 100nf cap to gnd
41 : +12v + 100nf cap to gnd
42 : +5v + 100nf cap to gnd
43 : GND
44 : not connected

My code simply sends a vector of 32 bytes, i.e. 256 bits, with all bits set to zero. This should turn off all the switches, but I measure the resistance across input X0,Y0, i.e. AD75019 pins 15,31. The results are strange: sometimes I get 5Mohm, sometimes 30ohm...

If I send a vector of 255, i.e. all bits set, then I usually get 55ohm across any pair of inputs.

If I send a vector of 31 zeros, and a single" one", it should connect X0,Y0, but this result nearly never occurs, sometimes, it may work once, but then on the next send, of 0s, then a single 1, fail.

I have tried various SPI clock prescaler values from 32 to 256 as per the data sheet. I have tired all combinations of polarity and phase, and the results seem to be random, but never as expected.

I feel that I must be missing something very simple, but for the life of me I don't see it

Would anyone have any thoughts?

Cheers,
Bob

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: AD75019 16x16 crosspoint switch/multiplexer cannot communicate via SPI

Post by Roberthh » Mon Feb 12, 2018 12:32 pm

As far as I understand the data sheet, you have to apply a negative pulse to PCLK, pin 1, to load the settting for the serial shift register into the parallel latches. See timing diagram on page 3 of the data sheet at http://www.analog.com/media/en/technica ... D75019.pdf

gratefulfrog
Posts: 149
Joined: Sun Mar 01, 2015 12:10 pm

Re: AD75019 16x16 crosspoint switch/multiplexer cannot communicate via SPI

Post by gratefulfrog » Mon Feb 12, 2018 1:36 pm

Thanks for that reminder, and I do pulse the PCLK to zero then back to one....

Any other ideas are of course welcome!
Cheers,
Bob

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: AD75019 16x16 crosspoint switch/multiplexer cannot communicate via SPI

Post by Roberthh » Mon Feb 12, 2018 7:40 pm

Did you try to vary phase & polarity?

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: AD75019 16x16 crosspoint switch/multiplexer cannot communicate via SPI

Post by pythoncoder » Wed Feb 14, 2018 11:35 am

Looking at the datasheet polarity and phase should be 0 (clock starts at zero, data sampled on leading edge). Is the t5 value in the datasheet being met? This is the time between the last edge of SCK and the leading (low going) edge of PCLK (5ms max). The only way to be sure of this is to measure it. Exceeding it could lead to randomness if the dynamic shift register loses data before its contents are transferred to the latch.
Peter Hinch
Index to my micropython libraries.

gratefulfrog
Posts: 149
Joined: Sun Mar 01, 2015 12:10 pm

Re: AD75019 16x16 crosspoint switch/multiplexer cannot communicate via SPI

Post by gratefulfrog » Wed Feb 14, 2018 11:42 am

@pythoncoder

Yes, all the timing requirements are met and I have measured on the scope.

I've continued to test this, now using a signal generator and the behaviors is exactly as I said:

With analog supplies +/-7.6v normal correct behavior

With analog supplies +/- 9v or +/- 11.35v or +/-12v, once some of the switches are closed they cannot be opened .

I get the same behavior when running it from a pyboard or an arduino...

My python code is here: https://github.com/gratefulfrog/ArduGui ... /spiMgr.py

I am at a loss as to what to do to debug this.


Thanks for the help!
Cheers,
Bob

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: AD75019 16x16 crosspoint switch/multiplexer cannot communicate via SPI

Post by pythoncoder » Wed Feb 14, 2018 12:02 pm

If it consistently works at +-7.6V and consistently fails at +-12V then the problem must presumably be electrical rather than in your code. In which case it's hard to diagnose remotely ;)

I can only suggest double-checking compliance with the "Power Supply Sequencing and Bypassing" section of the datasheet. Then probe around with the scope looking for glitches.
Peter Hinch
Index to my micropython libraries.

gratefulfrog
Posts: 149
Joined: Sun Mar 01, 2015 12:10 pm

Re: AD75019 16x16 crosspoint switch/multiplexer cannot communicate via SPI

Post by gratefulfrog » Thu Feb 15, 2018 12:30 pm

Thanks!

I have added diodes to the cirucuit as suggested in the data sheet. I used 1N4004 diodes instead of 1N4001 or 1N5818 as suggested, no change. I also tired BAT46 diodes, but no change either...

I am really at a loss..

Thanks for the help in any case!
B

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: AD75019 16x16 crosspoint switch/multiplexer cannot communicate via SPI

Post by Roberthh » Thu Feb 15, 2018 12:50 pm

Is there by chance/bad luck a connection between Vcc and Vdd (Pin 41 and 42)?
Also, when sending data, did you check the signal at the input with an oscilloscope for proper levels and timing?

gratefulfrog
Posts: 149
Joined: Sun Mar 01, 2015 12:10 pm

Re: AD75019 16x16 crosspoint switch/multiplexer cannot communicate via SPI

Post by gratefulfrog » Thu Feb 15, 2018 12:53 pm

Thanks, but no bad connection... sigh

Post Reply