General > General Technical Chat

Sub-par ad9833 sweep using arduino.

<< < (3/4) > >>

eti:

--- Quote from: ataradov on January 16, 2022, 02:01:01 am ---But you have not actually posted a link to the code. What help do you expect? Do you think there is only one AD9833 project using Arduino and we are supposed to find it ourselves?

Also, what is even continuous? AD9833 is not capable of producing truly continuous sweep. There will be steps as you reprogram it.

--- End quote ---

Yes, thanks for pointing that out - I forgot 😁 lol. I’m not afraid to face my faults - thanks for telling me - see! You’ve done something constructive, now you can smile. 😉

As much as I want to be kind to you and forgive you, and I do, I’d rather not interact with you. You have a history of jumping into my posts and being unkind. Your intellect is not enough to make me want help from you. Thanks for trying to help. Now, would you please refrain from future interactions, as I feel it’s detrimental for us both. I have no desire to defend this wish, you bring out the worst in people when you’re snotty.

Note to mods: should ataradov CHOOSE to wilfully ignore this civil request, I shall report each and every single interaction he attempts to make, and since my concern is from respecting your time as mods and very busy ones, this is advanced notice - not to be unkind to him, but he’s only here to provoke.

Thanks

ataradov:
This code updates frequency every millisecond. Feel free to remove the delay and modify the formula for the next frequency accordingly. You steps will be limited by the SPI's ability to write a new value into the register. This is the best AD9833 can do. The phase of the signal will remain continuous, this is guaranteed by the AD9833, but the frequency would change in steps, you can't avoid it. You can pick a very small step, bu then you won't be in control of the sweep time. You need to pick one.

This is a very reasonable code, BTW. The step selection is purely arbitrary, but you need to make one. Author made a choice of 1 ms. There is absolutely nothing wrong with that.

Also, you should not make comments about other's ability to code if you can't figure out 200 lines of easy to read code.

I will interact with whoever I want, thank you. Feel free to not post nonsense if you don't want to be called out.

SiliconWizard:

--- Quote from: ataradov on January 16, 2022, 02:10:52 am ---Also, you should not make comments about other's ability to code if you can't figure out 200 lines of easy to read code.

--- End quote ---

I would agree with this point. ;D

And reading the AD9833 datasheet would tell the OP what can and cannot be done. =)

nali:

--- Quote from: SiliconWizard on January 16, 2022, 02:41:03 am ---And reading the AD9833 datasheet would tell the OP what can and cannot be done. =)

--- End quote ---

Not to mention the data sheet of the MCU used by whichever Arduino. Why for example don't you change the code from using delays to timer interrupts, add a potentiometer to load timer values and give yourself a sweep speed control? Then you can publish it for someone else to have a play with...

What I can't fathom is why you even have an Arduino in the 1st instance, given your vitriolic hatred of the whole ecosystsm. There are plenty of ways to do the same thing in the analogue domain.

rstofer:
Worth noting (I think I got this right!):

The step size is logarithmic - ideal for Bode' Plots
The function SG_StepSweep() isn't referenced.  That's good because:
The variable SG_nSweep isn't initialized (so it is probably 0) and is used as a divisor (as well as a comparison value) in SG_StepSweep().  Division by 0 would be bad!

They made a movie about legacy code hanging around...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod