Problems with Triangle wave
Posted: Mon Oct 30, 2017 4:12 am
I use the following code to generate a Triangle Wave :
CHO RDAL , RMP1 ; Read LFO 1 value
SOF 1.999 , -0.5 ; Adjust to -0.5 to 0.5
ABSA ; Make sure we have a positive Triangle Wave
SOF 1 , -0.25 ; Adjust to -0.25 to +0.25
WRAX DACR , 0 ; write to DAC R
This gives me a Triangle Wave with two strange fenomena (I would have liked to attach a picture of the scope ....) :
A slight curve on the raising part .... (minor)
A significant vertical drop at start of downward slope, followed by a normal ramp down.
I seems to remember Frank explain that this had to do with adding a value to the counter until it reached max. - OK - but this should give a different drop depending on the added value (frequency), but this is not the case.
Since I need the Triangle Wave as modulation, this gives me a very unwanted beat in the modulated signal - any suggestions on how to solve this ?
CHO RDAL , RMP1 ; Read LFO 1 value
SOF 1.999 , -0.5 ; Adjust to -0.5 to 0.5
ABSA ; Make sure we have a positive Triangle Wave
SOF 1 , -0.25 ; Adjust to -0.25 to +0.25
WRAX DACR , 0 ; write to DAC R
This gives me a Triangle Wave with two strange fenomena (I would have liked to attach a picture of the scope ....) :
A slight curve on the raising part .... (minor)
A significant vertical drop at start of downward slope, followed by a normal ramp down.
I seems to remember Frank explain that this had to do with adding a value to the counter until it reached max. - OK - but this should give a different drop depending on the added value (frequency), but this is not the case.
Since I need the Triangle Wave as modulation, this gives me a very unwanted beat in the modulated signal - any suggestions on how to solve this ?