I wanna write a software on my Arduino Nano to control 16 Bit DAC MAX5217 using I2c, I checked alot of videos and stuff but nothing is so much related to what i want.
i wanna generate 0 .. 5 Volt out of my dac using a Potentiometer.
So basically i need a Potentiometer that has I2C and maybe an LCD or Voltmeter to see if i am really getting those 0 .. 5V.
The question is does anyone know how i can write that code or any related topics which can help me?
i can't find the device address in the MAX5217 so i can access with the I2C. Also i don't really know how the code will be to generate this 0 .. 5V i am pretty sure its super easy, but which addresses do i need out of my datasheet? whats the approach to write the code? thanks alot!
I've never used that chip but I took a quick-look at the datasheet. It says you can go from 0V to VDD - 0.2V or from 0.2V to VDD depending on how the load is connected. So, you'll need a power supply a little above 5V if you want to go all the way to 5V.
It's pretty typical for a DAC (or ADC) to have trouble near the power-supply limits, and of course, sometimes a "5V" power supply is several millivolts low (or high). You can't reach 5V with a 4.99V power supply.
Speaking of the load, you do know that a DAC is a signal or reference voltage, not a power supply, right?
i wanna generate 0 .. 5 Volt out of my dac using a Potentiometer.
The pot itself will put-out (approximately) 0 - 5V with a 5V supply, so are you sure you need to go from analog-to-digital-to-analog?
Also, the Arduino ACD is 10-bits (which should be plenty for a single-rotation pot) so you won't get 16-bit resolution out.
Don't forget the reference voltage for a 16-bit DAC (maybe the hardest part).
For a true 16-bit resolution, and 5volt range, the reference voltage has to be stable to 0.00005volt (50uV).
Why do you need that resolution.
Leo..
Thanks for your answer, yes i read the forum and learned how to use it. I Searched for something similiar to what i want but i couldn't find any related topics.
I am not asking for someone to write the code for me i just want some hints to start or to know which direction i should follow. i also heard about the I2C scanner to see which device register i have on my dac and found it out.
but i just need a hint on how to write a code to control this dac to produce for me a 0 .. 5 V so i can control my LDO. For sure i have to use the wire library for i2c communication and i have to define the dac register i have.
i don't have much exp in coding no. i programmed before only basic assignments in the uni. so i know the basic things of defining, declaration, using libraries and loops.
i am completly new to arduino and microcontroller stuff i am using this for the first time. i got my self a nano arduino and the dac i want and the wiring is not the problem i know how to connect the i2c connection and to put the pull up resistors and to use external chips for my vdd and vref and all of that stuff.
i just want a guide on how to write this code to control the dac so i can use it to drive my LDO.
lets say advanced electronics exp and zero exp with microcontrollers but i can read and write basic c codes.
Abuelfeed:
i wanna generate 0 .. 5 Volt out of my dac using a Potentiometer.
So basically i need a Potentiometer that has I2C and maybe an LCD or Voltmeter to see if i am really getting those 0 .. 5V.
Why does your potentiometer have to be I2C?
Why can't you read it into the Nano analog input as a potential divider?
Convert that to your 16bit word and send it to the DAC via I2C.
Is that what you are thinking of doing?
Tom..