Hi folks, I am working on an arduino project where I sample some analog voltages, do some math on them and then I output an analog voltage. Currently I have a ladder DAC setup using digital outputs from pins 0,1,2,4,7,8,12,13. My ladder DAC is buffered via a unity gain op-amp on the output.
I was under the impression that the PWM digital outputs could only be used as PWM outputs and not just set high or low like the other digital outputs. But now I am not so sure, if I can use more digital outputs then I can up my bit resolution, I'd like to go to 10 bits if this is possible.
I would also like to change my code to run faster, presently it calculates an integer for its output and then does a sequence where it sets each bit high or low etc, I would like faster response so I want to use the PORTD/DDRD port access to set all the bits in one step, any problems doing this? If I go to more than 8 bits output, then I will have to switch two ports commands (PORTB and PORTD) at the same time, "splitting" the high low bits between the two, is this easy?
Thanks for all the help!