Jump to content
  • 0

Digital Discovery - Logic DIO's are different to DIO's from the patterngenerator


stef

Question

Hey to all,

I'm new to Digilent products and the documentation of the DD is a bit less than I thought :-( . So hopefully anybody can help me out here. 

I'm trying to read a 16-Bit-parallel ADC with my Digital Discovery. First step is to send a Reset condition with the Patterngenerator.  If I want to check the sent Bits with the Logic analyzer, it seems quite different to what I expect. (shown in the picture below !     it starts with "Patterns2" followed by "Patterns1", the gap in the Logic is the pause between those patterns) DIO24 and DIO26 are vice versa for some reason and the reset pulse that should get low, doesn't even occur... also there is some bouncing at DIO26

1139228607_fehlerDD.thumb.jpg.10b2a2b261a0c168177e0f510e6697bc.jpg

Checked the wires ->  they're ok... it has to be some issue with my settings.

Maybe it's not possible to write and read this DIO's at the same time?

I hope you can help me!

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

Hi @stef,

Could you post your WaveForms project and script that you are using? I'm not certain what all of the time bases are on the logic analyzer screenshots and when each of your patterns are triggered.

I'm not certain what you are thinking by your statement of "Maybe it's not possible to write and read this DIO's at the same time", but in general you would not want to assign the same wire to be both an input and an output simultaneously, you would instead want the output wire (from the pattern generator) to go a different wire as a logic analyzer input, but again I'm not certain of your physical setup. Could you attach a picture of your setup?

Thanks,
JColvin

Link to comment
Share on other sites

Hi @stef

You are not seeing the 100ns RST pulse probably because you were capturing it with the Logic Analyzer at low rate (<=10MHz, >=100ns). (i don't see the rate in the screenshot)
The sample rate should be higher that the pulse length.
This is also true for the Read signal of 10MHz (50ns low, 50ns) high captured at 10MHz (100ns sampling)...

image.thumb.png.480953520238cea9eed373f21d06ad4e.png

 

You could use a Script like this to start Patterns 1 and 2 in quick (~10ms) sequence. 
Here you have the workspace: stef.dwf3work

image.thumb.png.5b9cdaee72d0a17bd8f5f6f6a5e7bb48.png

image.thumb.png.ae99e50db28159dca947481485e57f21.png

Link to comment
Share on other sites

Hi @JColvin,

thanks for your fast answer!

sure , I've attached the file. 

 if I choose DIO24 in Pattern generator to do a Clocke Signal with 50kHz and DIO26 to do a 10MHz clock Signal and read it per wire in the Logic analyzer it works all fine.

But if I  wire them to my ADC, I also wanna' check those Signals. So i call them again (not wired) in the Logicanalyzer, and in this case it shows me the signal DIO24 on the DIO26 path and vice versa. and that is what I've tried to show with the screenshots^^

 

Another question is, if I want to trigger the Pattern generator with a falling edge of the DRDY-Signal(DIO17) from the logic Analyzer, how do I script that?

 

ADS1606 Mod.7z

Link to comment
Share on other sites

Hi @attila

Yep that's a really  good point :D . I think it also looks this weird  because I've tried to show the Logic in the Configuration from DIO0...15,DIO24..31 with only 200MHz. it might works better with separated Logic tab's.

Thank you very much, i'm gonna try this!

Link to comment
Share on other sites

Hi again! I've tried the code and it seems to work .

except that i get now a communication problem with my DD. It disconnects while running randomly. 

I've googled and found that one issue could be the limitation of the usb port.  So I used a usb hub to solve it. But still the Error : Dptil0 failed ERC:0x401

 

can't find the error code in the documentation...any suggestions?

stef2FORtest.dwf3work

disconnected.JPG

Link to comment
Share on other sites

already tried another cable and updated the software, it's less since I stop the infinity run but still happens...

 

 also have a question to the i2c protocol. I've written some custom code to read a temperature sensor. But don't know how I can save the returned value, because the script only reads the protocoll() call as true or false and doesn't give the return to the script. Do I have to use a logic function too?

Ps.:

In the Protocoll is

return "Temperature:" + t + "*C";      -> from the raw data    h19 h00   converted to  25,0  at the console window

this convertion isn't included in the script

var b = Protocol.I2C.ReadText.text

print("raw data: " + b)   -> h19 h00

can you tell me how waveform is doing that with the datatype "var"?

Link to comment
Share on other sites

On ‎1‎/‎28‎/‎2019 at 12:26 PM, attila said:

Hi @stef

From the Script tool you can perform I2C transfer like this:

var bytes = Protocol.I2C.Read(0x0D, 2) // returns array of 2 bytes read from device address 0x0D
var temp = (((bytes[0]<<26) | (bytes[1]<<18)) >>18)/32;
print("Temp: "+temp+"*C")

image.png.8f284d31a4065fb049687c49efda8bb3.png

ok, didn't know that there is no need for .text or .value.  without an API...

Can you explain me why you do the shift operation? It works without it too

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...