2 Replies Latest reply on May 3, 2012 12:27 PM by userc_44117

    How to make DAC start with last value?

      The goal is to have the DAC start at the last power level where it was set before being powered down.


      Looking at the API, I thought I would be able to save the config of the DAC (including its current level) with VDAC8_SaveConfig()


      With my testing, it doesn't seem to do the trick.  Do I need to write straight to some register?  Do I need to implement some EEPROM to save my value?



        • 1. Re: How to make DAC start with last value?

          To save any values surviving a power-down the only solution is to use EEProm.




          You need power to program the EEProm




          Sounds like a logical paradoxon?


          Well you'll have to detect the power-down situation early (lost of AC) and use a gold-cap that lasts for programming the eeprom and shut-down.




          The SaveConfiguration() of the DAC is only used to store some info for sleep-mode in SRam which will be lost at PD.




          Power to the PSoC!



          • 2. Re: How to make DAC start with last value?

             Thanks for the information.


            Since this value isn't meant to change continuously during operation, it may be safe just to write it whenever the value is changed.


            Thanks again!