Jump to content

Stefan-F

Members
  • Posts

    4
  • Joined

  • Last visited

Community Answers

  1. Stefan-F's post in DD: How to add latch pulse to SPI was marked as the answer   
    OK, I found the solution myself:
    Pin DIO31 has the address 7, not 31.
    So the following code does the trick:
    // Pmod DA1 - AD7303 DIO.Set(31-24,1); // <-- DIO31 has address 7 for(var i = 0; i < 50 & wait(0.1); i++){ var va = 128+sin(2*PI*i/50)*127; var vb = 128+cos(2*PI*i/50)*127; Start(); Write(16, 0x0100 | (va & 0xFF)); // Update DAC A input register from shift register // Stop(); // Start(); Write(16, 0x2400 | (vb & 0xFF) ); // Load DAC B input register from shift register and update both DAC A and DAC B DAC registers outputs. Stop(); // output latch pulse: DIO.Set(31-24,0); // <-- DIO31 has address 7 // wait(0.0001); // without wait(), pulse with is approx. 0.9 ms DIO.Set(31-24,1); // <-- DIO31 has address 7 } return "done"  
×
×
  • Create New...