Go Down

Topic: combining two ports for a DAC on pins 5-12 (Read 412 times) previous topic - next topic

loss1234

I have been making some changes to the code found on this page:

http://blog.wingedvictorydesign.com/2009/05/29/generate-real-time-audio-on-the-arduino-using-pulse-code-modulation/

so that I can use a DAC instead of PWM.

However, instead of just doing this to the code so that the audio comes out on PORTD



PORTD=sineovertones[waveindex] + 128;
waveindex++;

OCR1A = analog0;..........


I would like to find a way to call both PORTD and PORTB so I can connect the DAC to pins 5-12.



anyone have any idea how to do this without using analogWrite?

thanks so much (i am really trying to get a handle on how to communicate with the digital outputs on the arduino.

my main goals are getting the audio inputs sent to the outputs.


thanks

loss1234

is it maybe not possible to combine the two?


Go Up