I am working on a little synth that has a low pass filter and for controlling it I need a “controlled voltage” output and also I want to reflect the value on a led.
I stole from an example this line and adapted it for my use so I can send the CV output, also I added another one for the LED output.
(red_count++ >= r) ? PORTD &= ~(1 << 3) : PORTD |= (1 << 3); (red_count++ >= cutoffLed) ? PORTD &= ~(1 << 5) : PORTD |= (1 << 5);
red_count is always zero, it’s there because the example I used. I really don’t know how this works and don’t understand any of the fast pwm tutorials.
Well, it works…the problem that I have is that if I only use one of the line each works perfectly. But using both you can see the led flashing and also you can feel it’s a very “stepy” output, I mean there should be intermediate points between two values when turning the pot but it jump from one to another, it’s like you have only 10 different output values both on LED and on CV output.
I think it’s because Arduino it’s being overused as it does a lot of calculations so it can keep up with both outputs.
I wanted to try getting an output from a different PORT PIN, for example PORTB, pin 8… but cannot manage to get the line that does it. How can I do that?