This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PGA308EVM: Software Lock Mode - VOUT not enabling after programming the registers

Part Number: PGA308EVM
Other Parts Discussed in Thread: PGA308,

Tool/software:

I'm attempting to follow the flow chart in Figure 5-14 of the user manual.

I'm using an Arduino Uno to drive & a logic analyzer on vout_F to verify steps.

The register reads & writes seem to be going as expected but the vout doesn't seem to be enabled afterwards.

I have a few questions:

1) does this mode require a power cycle prior to each start?

2) is it required to disable one-wire (CFG2 D15 = 1) after reading / writing to RAM registers?

3) in order to successfully use this mode, do I need to do any of the steps shown in figure 5-14 other than those that mention "Read" or "Write" (e.g. do I need to disable checksum or enable one-wire or disable one-wire timeouts)?

4) will One-wire reads & writes still work in this mode even if I set DIS OUT = 0?  If not, at what point on the flowchart is it appropriate to set DIS OUT?

If it helps, here is the output from the logic analyzer:

Regards,

Rob

  • To follow up, here is more information about this particular application:

    Jumper settings:

    1 - 1W to VOUT
    2 - fixed VREF
    3 - fixed VREF
    4 - 4.096 V
    5 - Int VREF
    6 - NC
    7 - 1W to One
    9 - NC
    10 - NC
    11 - VCLAMP
    13 - VOUT to XTR
    14 - VDUT
    15 - VEXC = VREF
    16 - EXT VCLAMP
    17 - EXT
    18 - EXT

    VSUPPLY of 5V is tied to VCLMP EXT at T2.

    VIN ranges from -5.979 to -3.336 mV for desired PGA308 output of 0.5 to 4.5 V.

    Code snippet (transactOneWire arguments are initializationByte, commandByte, LSBDataByte and MSBDataByte::

    void buttonPress() {
      unsigned short int zDAC = 0xD5D3;
      unsigned short int gDAC = 0x359F;
      unsigned short int CFG0 = 0x0F07;
      unsigned short int CFG1 = 0x0000;
      unsigned short int CFG2 = 0x0800;
      unsigned int sum1 = zDAC + gDAC;
      unsigned char binaryCarry = sum1 >> 16 & 0x01;
      unsigned short int sum1_c = (0xFFFF & sum1) + binaryCarry;
      unsigned int sum2 = sum1_c + CFG0;
      binaryCarry = sum2 >> 16 & 0x01;
      unsigned short int sum2_c = (0xFFFF & sum2) + binaryCarry;
      unsigned int sum3 = sum2_c + CFG1;
      binaryCarry = sum3 >> 16 & 0x01;
      unsigned short int sum3_c = (0xFFFF & sum3) + binaryCarry;
      unsigned int sum4 = sum3_c + CFG2;
      binaryCarry = sum4 >> 16 & 0x01;
      unsigned short int sum4_c = (0xFFFF & sum4) + binaryCarry;
      unsigned short int checksum = ~sum4_c;
      PORTD &= ~0x20;  // PGA308 power off
      delay(10);
      PORTD |= 0x20;  // PGA308 power on
      delay(10);
      transactOneWire(0x55, 0x04, 0x00, 0x28);
      TwoByteStruct TIFlag = transactOneWire(0x55, 0xC0, 0x00, 0x00);
      transactOneWire(0x55, 0x07, 0x50, 0x00);  // SWL
      transactOneWire(0x55, 0x00, 0xFF & zDAC, zDAC >> 8);
      transactOneWire(0x55, 0x01, 0xFF & gDAC, gDAC >> 8);
      transactOneWire(0x55, 0x02, 0xFF & CFG0, CFG0 >> 8);
      transactOneWire(0x55, 0x03, 0xFF & CFG1, CFG1 >> 8);
      transactOneWire(0x55, 0x04, 0xFF & CFG2, CFG2 >> 8);
      // transactOneWire(0x55, 0x05, 0xFF & checksum, checksum >> 8);
      // transactOneWire(0x55, 0x04, 0x00, 0x08);
      Serial.println("TIFlag = " + String(TIFlag.MSBDataByte << 8 | TIFlag.LSBDataByte, HEX));
      Serial.println("checksum = " + String(checksum, HEX));
      // delay(2e3);
    }
  • Robert, thanks for the great detail documenting the issue.  I am going to review your question today and should have an answer by the end of the day.  Sorry for the delay.

    Best regards, Art

  • Robert,

    1. The PGA308EVM has a feature that echo's all the commands sent by the USB-DAQ-Platform.
    2. This feature can be found under the "USB controls" pull-down menu "Debug USB" option.  Press the button labeled "Press for Debug".  This will echo all the commands sent to the little debug window.
    3. This feature allows you to see the one-wire commands the PGA308EVM software is sending to the device. 
    4. I enabled this debug feature, cleared the initial commands, and then started a calibration. 
    5. For each step in the calibration the first 10 registers are written to to configure the device.  Thus, my goal was to see the exact sequence of commands sent in a typical register write.
    6. Below is the screen shot of the debug tool for the first step of the calibration process.
      1. First power is cycled off (CMD OFF)
      2. Second power is cycled on immediately followed by communications on the one-wire line.  That corresponds to the first step in figure 5-14.  This is done with CMD WAKE_UP_ONE
      3. Then register 7 is written to (SFTC Register) software lock is initiated (ONE 55 7 50 0).
      4. Next registers 0 to A are written.
    7. Item 6 illustrates everything that is needed to communicate if you have one-wire seporate from Vout.  However, in your case one-wire is tied to Vout.  Thus, you have to do the following extra steps.
      1. When one-wire is connected to Vout, the amplifier output signal cannot be active at the same time you communicate.  If this would happen, the output signal would fight the digital communications.  So, when the device is powered up the output is disabled for a short time (25ms).  If communications is established in that 25ms period the amplifier output will remain disabled for 1sec.  After the 1sec period, the PGA308 will enable the amplifier output if the checksum is correct.
      2. Once the amplifier is enabled, the only way you can re-establish communications is to cycle power.
    8. The one-wire disable is a recommended measure to avoid accidentally communicate with the one-wire interface (e.g. noise or amplifier output transitions).   Technically, during development you shouldn't have to use this feature but eventually you will want to disable the one-wire after the device is configured to "write protect" the device.  The disable feature will not be active when power is cycled.
    9. You gave me a lot of information.  I mainly focused on your questions and didn't check the details of your code.  I assume that you have the EVM since you mention the jumper settings.  I know you are using the Arduino, but I think you may want to periodically use the USB-DAQ during your development as a debug tool (or reference design).  Let me know if this information helped or if you have further questions.

    best regards, Art 

  • Hi Art,

    Thank you for the tips.  I didn't know about the cool USB debug tool, I'm sure this will prove to be useful going forward.

    It turns out that the pin driving the one-wire was reverting back to High after register reads/writes which held the vOut line to that logic high voltage (not allowing changes on vOUT).  Things are now back to normal & working.

    Have a great weekend.

    Regards,

    Rob

  • Hi Art,

    Are there any operating modes that do not require a power cycle each time reads/writes are to be performed?

    Regards,

    Rob

  • Rob,  

    If you keep the one-wire line seporate from Vout, you can keep the interface active and don't have to cycle power.  Whenever, you tie one-wire to Vout you have to cycle power.

    Best regards, Art