Please note: Friday June 18 is a holiday celebrating Juneteenth, please allow extra time for your order to arrive and plan accordingly.
0

Adafruit MCP4728 Quad DAC with EEPROM - STEMMA QT / Qwiic
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit MCP4728 Quad DAC with EEPROM - STEMMA QT / Qwiic

by AAires on Sat Jun 05, 2021 3:47 pm

Hi there,

I'm building a project with a raspberry pi pico and an Adafruit MCP4728 Quad DAC with EEPROM - STEMMA QT / Qwiic using MICROPYTHON.
I would like to ask your help to the following, is it possible to apply the formula DAC OUTPUT= 2.59*(DAC VALUE)-1.29 to DAC outputs?

Example:

the module receives a 12-bit value 2696 that equals to a 3.3V output, but I need to convert it to 7.3 with that formula.

Thanks for your help.

Best regards

AAires
 
Posts: 4
Joined: Sat Jun 05, 2021 3:24 pm

Re: Adafruit MCP4728 Quad DAC with EEPROM - STEMMA QT / Qwii

by adafruit_support_mike on Sun Jun 06, 2021 8:09 pm

I can't think of any reason why it wouldn't work. You can calculate any value you want.

adafruit_support_mike
 
Posts: 62799
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adafruit MCP4728 Quad DAC with EEPROM - STEMMA QT / Qwii

by AAires on Thu Jun 10, 2021 3:34 pm

Thanks for your Replay. Could you tell me how to do it?

I'm using the mcp4728.py found até Github.... https://github.com/adafruit/Adafruit_MCP4728

Many thanks

AAires
 
Posts: 4
Joined: Sat Jun 05, 2021 3:24 pm

Re: Adafruit MCP4728 Quad DAC with EEPROM - STEMMA QT / Qwii

by adafruit_support_mike on Fri Jun 11, 2021 8:14 pm

You already have the equation above. Just use that in your code.

adafruit_support_mike
 
Posts: 62799
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adafruit MCP4728 Quad DAC with EEPROM - STEMMA QT / Qwii

by AAires on Fri Jun 11, 2021 8:28 pm

Ok

Sorry but I do not have any experience with Micropython ando do not know how to do it.
Could you be so kind to Help me.

Many thanks!

AAires
 
Posts: 4
Joined: Sat Jun 05, 2021 3:24 pm

Re: Adafruit MCP4728 Quad DAC with EEPROM - STEMMA QT / Qwii

by adafruit_support_mike on Sat Jun 12, 2021 6:34 am

We don't do on-demand programming. You'll need to learn enough of the language to make the change on your own.

Math is fairly easy in Python, so learning shouldn't take long.

adafruit_support_mike
 
Posts: 62799
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adafruit MCP4728 Quad DAC with EEPROM - STEMMA QT / Qwii

by AAires on Sat Jun 12, 2021 6:51 am

Ok

I'm ONLY struggle to identify the output "object" to apply the equation.

AAires
 
Posts: 4
Joined: Sat Jun 05, 2021 3:24 pm

Please be positive and constructive with your questions and comments.