How to make DAC start with last value?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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?

   

Thanks.

0 Likes
2 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

   

But:

   

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!

   

Bob

0 Likes
Anonymous
Not applicable

 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!

   

Shelby

0 Likes