2 Replies Latest reply on Apr 5, 2015 4:43 PM by nick.johnson

    Routing two VDACs to any of 17 pins

    nick.johnson

       I have a design where I need to be able to supply analog voltages to a variety of pins for test purposes. I'm using a PSoC 5LP chip with two VDACs, and I'd like to be able to generate two independent voltages or waveforms, routing each one to one (or even several) arbitrarily selected pins.

         

      I've had a go at this a couple of ways; two great big 17-way MUXes which connect to the array of pins works fine, but has the downside that you nothing prevents you connecting both DACs to the same analog pin.

         

      17 2-way MUXes makes more conceptual sense, since it allows each pin to choose which VDAC (or neither) it's connected to. However, the API for this is a nightmare - 17 individual MUX APIs, with no straightforward way to address them programmatically. I can't use a hardware mux to connect these all to a single set of registers, because PSoC creator won't allow the 'wide' side of an analog hardware mux to be connected to anything other than GPIO pins.

         

      Can anyone suggest a third way? I looked into customizing the MUX component, but it's a fiendishly complex bit of dynamically generated verilog.

        • 1. Re: Routing two VDACs to any of 17 pins
          user_14586677

          I've had a go at this a couple of ways; two great big 17-way MUXes which connect to the array of pins works fine, but has the downside that you nothing prevents you connecting both DACs to the same analog pin.

             

           

             

          Why would you not know which pin mux A is going to and mux B, that is simple code to

             

          test for a collision when you are selecting the channel ? Unless the muxes were HW driven

             

          and even then the HW could test for that.

             

           

             

          Maybe I do not fully understand the problem.

             

           

             

          Regards, Dana.

          • 2. Re: Routing two VDACs to any of 17 pins
            nick.johnson

             Yes, it's certainly possible in software to prevent accidentally connecting both DACs to the same pin. I simply hoped there was a more elegant solution.