Jump to content

JuanThePawn

Members
  • Posts

    5
  • Joined

  • Last visited

JuanThePawn's Achievements

Newbie

Newbie (1/4)

0

Reputation

  1. Thanks @attila, I was not aware of that 32K AWG configuration - we will use that, it should improve the situation by a factor of 2. I'm not excited about using SW timing due to USB + host OS latency, I hope the 32K config will be good for now. Does Digilent sell any AD3-like Waveforms SDK-enabled products with > 32K AWG buffer?
  2. AD3 is a great product, thanks for making it and thanks for the great support. Suppose I want to generate a repeating almost-square wave on Arbitrary Waveform Generator (AWG), let's I want a 10KHz (= 100,000ns) repeating signal, low voltage 0V, high voltage 1V, rise + fall time 100ns. AD3 AWG has a buffer size of 16384 data points and a "funcPlay" (Value 31) mode - "Generate waveform in stream play style. Optimizes for average requested frequency". So I can create my 100,000ns signal across 16384 data points, each data point represents the voltage for 6.1ns, so I end up programming as follows: N, V (mv) 0 (=0ns), 0 1 (=6.1ns), 61mv 2 (=12.2ns), 120mv ... 17 (=103.7ns), 1000mv 18, 1000mv 19, 1000mv ... 8176 (=49873.6ns), 950mv // start ramping down.. ... The signal generated is good enough for me, I have ~17 data points to generate my 100ns rise / fall function, which is good enough. But now let's say I want to generate a 1KHz (=1,000,000ns) signal rather than 10KHz. Now instead of 17 data points for my 100ns rise / fall function, I have only ~2 data points! That is not good enough for me, the signal will not be close enough to a smooth 100ns rise/fall. So I need a new strategy here, maybe "funcPlay" will not work. Is there a mode where I can specify arbitrary V and t data points rather than "constant sample rate"? E.g. t, V 0, 0 10ns, 100mv 20ns, 200mv 30ns, 300mv, ... 100ns, 1000mv, 49900ns, 1000mv 49910ns, 900mv 49920ns, 800mv 49930ns, 700mv .. You can see that with such a mode (where I can specify arbitrary t for each V), I can represent my function very accurately with very few data points (because my function is stuck at 0V or 1V for most of the time). Does such a mode exist? Or is there some other alternative to generate the functions I need?
  3. I'm trying to set the drive strength of an AD3 DIO with FDwfDigitalIODriveSet(), e.g.: + int slew = 0; + double amp = 0.008; + FDwfDigitalIODriveSet(dev, 0, amp, slew); + FDwfDigitalIODriveGet(dev, 0, &amp, &slew); + printf("amp: %f slew %d\n", amp, slew); .. but Get() gives no indication that my setting took effect: amp: 0.000000 slew 0 Am I using the API properly? (I also tried specifying amp = 8.0, just in case the method expects mA, not A).
  4. Hi @attila, Calling FDwfDigitalI2cClear() is not sufficient to "fix" I2C after a SPI transaction. Calling FDwfDigitalInReset() and FDwfDigitalOutReset() is sufficient to "fix" I2C (I found references you made to these routines in some other threads). FDwfDigitalInReset() and FDwfDigitalOutReset() seem like pretty big hammers (I think all DIOs get reset after calling these?), but maybe there is no alternative?
  5. I'm using the AD3 WaveForms SDK to try and control some I2C and SPI peripherals. I'm aware of this note in the manual: The protocols use the Digital-In/Out device resources to create various communication protocols. Only one of the protocols can be used at a time. In spite of this note, I thought I would be OK because: 1. My I2C DIOs are different than my SPI DIOs. 2. I don't need to do SPI and I2C simultaneously (or anything close to simultaneously), e.g., my requirement is to do an I2C master write, and then ~100ms later do a SPI master read/write. In developing my application I have found that I2C works fine, until the moment I call FDwfDigitalSpiWriteRead() (or any SPI Write()/Read() routine, for that matter). After I call FDwfDigitalSpiWriteRead(), all subsequent calls to FDwfDigitalI2CWrite() will error out (pNak = -1). Do I need to take additional steps to switch between AD3 and I2C protocol functions?
×
×
  • Create New...