Jump to content

Adam1973

Members
  • Posts

    30
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Adam1973's Achievements

Frequent Visitor

Frequent Visitor (3/4)

4

Reputation

  1. Hi again. Using the SPIselect as relay control worked :) Thanks a lot Adam.
  2. Thanks for the reply :) I shall have a look and report back. Thanks again, Adam
  3. Hope everyone is well. I need some help getting my I/O to work when using SPI. Here is what I am trying to do. I have 10 SPI controlled 8 channel switches, each of which has a chip select line which is active low. I also have three relays which need to be switched on at the start of the programme. So my chip select lines are using I/O channels 1-10, SPI data is on I/O 0, Clock is on I/O 11 and relays are using I/O 12, 13 and 14. I want to set all CS lines high at power on and set all relays on. I have a routine called set_io where I set all CS lines and relay lines high, I then thought when running the SPI routine, it would just use the relevant DIN, CLK, and CS mapped out in this routine. Well it stops the SPI working? Anyone know how to get over this issue? Note: The SPI works fine when the set_io routine is not used. Many thanks Adam
  4. My bad, I wasn't scoping it with the clock. I can now see the data changing :) Thanks Adam
  5. Thanks Attila. Let me try that and I will report back with any issues. Thanks Adam
  6. Hi all. Hope you are all well and having a nice weekend. Can someone please help me? I am trying to loop through a list which has different hex value and then send them to the SPI routine. The routine works fine if I add the data manually as hex 0x80 for example. When I try and send SPI from the list it is not working, the data output on a scope stays the same. If I print the list values they are printed as decimals. I want to change the hex value to be sent from the list and not enter it manually. I have tried converting the variable HEX_VAL to hex but not sure if I am doing this correctly as it then complains about being a str. Everything is setup as an int as far as I can see and I have declared HEX_VAL at the top of the code as an int. Any help will be much appreciated. I have attached a screen shot so you can see the code. Thanks Adam
  7. Yep that worked too. Thanks to all for the help :) This is a very good forum indeed.
  8. Hello Attila. Ah that might be the issue :) I did download waveforms only the other day but cannot see the FFT py. Let me download the version above. Thanks Adam
  9. Hi Attila. Thanks for the link to the thread about frequency measurements. I thought I would have a look but it won't run, I get this error: Traceback (most recent call last): File "C:\Users\450362\Documents\AnalogIn_FFT.py", line 99, in <module> dwf.FDwfSpectrumWindow(byref(rgdWindow), c_int(nSamples), DwfWindowFlatTop, vBeta, byref(vNEBW)) File "C:\Users\450362\AppData\Local\Programs\Python\Python310\lib\ctypes\__init__.py", line 387, in __getattr__ func = self.__getitem__(name) File "C:\Users\450362\AppData\Local\Programs\Python\Python310\lib\ctypes\__init__.py", line 392, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: function 'FDwfSpectrumWindow' not found
  10. Hi all. Does anyone know if Digilent or any other company offer an annual calibration service for the Digilent ADP5250? Many thanks Adam
  11. Hi Sidney. Yes I want to power up the device and set it's power supplies and switch a few IO on for some relay control first. I'll give that a go :) Thanks Adam
  12. Hi Sidney It's brilliant :) One question if I may. I want to power on the device at the start of my code because I want to set up other parts before I measure the frequency. I see in the code you have dwf = DwfLibrary() with openDwfDevice(dwf) as device: The code uses with statement with reference to device.analogIn. How do I get to power the device up at the start without messing up the code? Cheers Adam
  13. The printing to file works a treat.... you are amazing :) Thanks Adam
  14. Thanks Sidney. I still get the error but it's OK as all I want is the frequency. Thanks ever so much for your help Adam
×
×
  • Create New...