is it possible to generate staircase sweep voltage using atmega2560?

hello.. i got a problem regarding generating a staircase wave of voltage for my curve tracer project. any guidance is truly appreciate :)

Maybe if you told us what the problem you have is, we could help you.

im a newbie. the problem is i want to generate a staircase from 1v-5v with 1v increment in 1ms. :disappointed_relieved: but i dont know how. i read about using dac and totally dont understand =(

g0g0nyte: im a newbie. the problem is i want to generate a staircase from 1v-5v with 1v increment in 1ms. :disappointed_relieved: but i dont know how. i read about using dac and totally dont understand =(

If you don't have any idea where to start or how to tackle the problem, I don't suppose you're likely to get anywhere. Have you done any programming or worked with electronics before? What have you done so far in your attempt to solve the problem?

yes i do. im a an electronic student. i manage to generate sawtooth wave which is require in curve tracer project.for staircase i just have 1 solution which is using 5 port and resistor to get the desire output by programming but its not efficient. if i using fast pwm mode can i get a staircase increment from 1v to 5 v and loop back the signal?

Use a DAC.

ouh..ic..thanks leon :) :) :) do u hav any link or tutorial regarding dac?

Useful search term. "R-2R ladder"

g0g0nyte:
yes i do. im a an electronic student. i manage to generate sawtooth wave which is require in curve tracer project.for staircase i just have 1 solution which is using 5 port and resistor to get the desire output by programming but its not efficient. if i using fast pwm mode can i get a staircase increment from 1v to 5 v and loop back the signal?

I suppose you could smooth the PWM signal to convert the duty cycle into an analog value which you could use to drive an op amp. Using a proper DAC is the better way to do it, though. If you’re an electronics student you should have no trouble understanding the concept of a DAC.

thanks guys :slight_smile: :slight_smile: :slight_smile: