RX62N on the YRDKRX62N demo - DAC floor?

I'm tinkering with the D/A converter on the YRDKRX62N board and I've noticed a quirk--at DA.DADR1 = 0, I'm getting 1.3V out on P05/DA1 pin.  JP17 isn't populated fyi, nor is J8.

DA.DADR1 = 1023 shows full Vcc (~3.27V on mine), 512 shows somewhere in the middle.

I perused the code in the RPDL for the D/A converter and it looks like I'm doing everything correctly here.  Anyone else seen this?

Here's my code for reference (using e2studio with GNURX v12.03):

void HardwareSetup(void)
{
    SYSTEM.SCKCR.BIT.ICK = 0x00; // ICLK = 96MHz
    SYSTEM.SCKCR.BIT.PCK = 0x01; // PCLK = 48MHz
    SYSTEM.SCKCR.BIT.PSTOP1 = 1;
    SYSTEM.SCKCR.BIT.PSTOP0 = 1;

    // P05 is DA1
    PORT0.DDR.BIT.B5 = 0; // Disable output buffers
    PORT0.ICR.BIT.B5 = 0; // Ensure input buffer is off

    // Enable DA1 DAC output (DA0 is not pinned out on the LQFP-100 version of the RX62N)
    MSTP(DA) = 0;
    DA.DADPR.BIT.DPSEL = 0; // Data loaded LSB-aligned
    DA.DACR.BIT.DAE = 0; // Don't think this really matters here but the RPDL sets this 0
    DA.DACR.BIT.DAOE1 = 1; // DA1 enabled
}

int main(void)
{
    DA.DADR1 = (uint16_t)768; // 3/4ths of AVcc, should be around 2.4-2.5V
    while (1) {
        ;
    }
  return 0;
}

  • Hi Spirilis,

    the reason is the load of the pull-up resistor R55 of 5.1kOhms at the DA1 output and the internal source impedance of 3.6kOhms inside the RX's DAC.

    In the zero volt output case the voltage drop over the internal source resistance is 3.6kOhms/(3.6kOhms+5.1kOhms) * 3.3V ~ 1.36V.

    Best regards

    Ralf