5203 Arbitrary Generator

Post general discussions on using our drivers to write your own software here
Post Reply
Guest

5203 Arbitrary Generator

Post by Guest »

Hi,

I am trying to set up the arbitrary generator on the 5203 and found some unclear points in the documentation.

The manual says: "The arbitrary waveform generator uses direct digital synthesis (DDS). It maintains a 32-bit phase counter that indicates the present location in the waveform. The top 11 bits of the counter are used as an index into a buffer containing the arbitrary waveform."

11 bits would mean 2^11=2048 samples, while the data sheet states that the 5203 has a 8k memory - what is wrong here?

The sample code ps5000con.c has a passage:
" * - allows for custom waveform (values 0..4192) of up to 8192 samples long", but the data sheet says the DAC has a resolution of 12 bit, so range would be 0..4095 - which one is correct?

The API call ps5000SetSigGenArbitrary has a parameter "arbitraryWaveformSize, the size of the arbitrary waveform buffer", how is this used? It does not make sense for continuous signals to upload only a partial (less than 8192 samples) waveform unless
- you want to have gaps in the generated waveforms (which means the remaining samples would need to be interpreted as 0)
- the DDS phase accumulator is changed to wrap not at 8191 samples, but at a lower sample number (which would be possible, but rather uncommon for a DDS). How does this work?

- Martin

Robin
Advanced User
Advanced User
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: 5203 Arbitrary Generator

Post by Robin »

Hi Martin

The comment in the console example is incorrect. The signal range should be 0 to 4095 (I have changed this in the example).

When you call ps5000SetSigGenArbitrary, the waveform buffer can be between

#define MIN_SIG_GEN_BUFFER_SIZE 10

and

#define MAX_SIG_GEN_BUFFER_SIZE 8192

The phase counter is changed to wrap at the size of the buffer.

Regarding the phase counter, the manual is incorrect, it should say "the top 13 bits". I will make sure this is corrected.

Thanks for bringing this to our attention.

Regards

Robin

Post Reply