Problems with Triangle wave

Software questions and issues with the FV-1

Moderator: frank

Post Reply
Admiral_dk
Posts: 13
Joined: Wed Sep 27, 2017 8:31 am

Problems with Triangle wave

Post by Admiral_dk »

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 ?
Admiral_dk
Posts: 13
Joined: Wed Sep 27, 2017 8:31 am

Post by Admiral_dk »

Strange - I had the same problem on two different FV-1's for days last week - as described above.

So I decided to do an experiment instead of waiting for replies - just to see the relationship between the "original" Ramp and the calculated Triangle and modified the code to :

CHO RDAL, RMP1 ; Read LFO 1 value
WRAX DACR, 1
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 DACL, 1

And now there's no vertical drop - but the curve on the Triangle is extremely frequency dependent, as if there's a high pass filter between the software and the DACR output - I have the probes directly on the pin 27 and 28, so that's not the explanation ....

ARGH :evil: - as I type I decide to switch probes, and it turns out that I have a defective probe :oops: :evil: ... sorry ....

But then I'm back to why I have a modulation artifact on the Audio Output .... oh well - back to debugging.
Post Reply