Feedback for version 0.9a here

Information and discussions on Spectrum Analysis
K9AQ
Posts: 28
Joined: Sat Jan 14, 2017 1:20 am

Re: Feedback for version 0.9a here

Postby K9AQ » Sat Jun 23, 2018 3:59 pm

Steve,

I just want to double check the pin numbering that you are using. Are you using the pin numbers on the Arduino headers? I am using the digital/PWM pins.

Don

Reason: No reason

SteveAndrew
Posts: 119
Joined: Thu Nov 16, 2017 11:06 pm
Location: Gold Coast, QLD, Australia

Re: Feedback for version 0.9a here

Postby SteveAndrew » Sun Jun 24, 2018 1:43 am

K9AQ wrote: Is there any feedback from the DDS? I notice when using the frequency related commands that there is no feedback to the terminal. I was assuming that was normal.

There is no feedback from the DDS to the Arduino, neither is there any feedback from the Arduino to the analyser. Currently there is no way for the Arduino to detect if a DDS is present, or what type is being used. I could use some of the the port pins to be set via jumpers to indicate what type of DDS is being used. I might do that in a future version. The combo box on the Tracking generator panel lists several DDS types. The only reason I included them was so that the maximum frequencies selected by the user would not exceed those that the selected DDS could generate. Currently nothing is done with the selection.

K9AQ wrote:Have you tested with the AD9850 or with a AD9851?

All testing has been done using an AD9851.

K9AQ wrote: just want to double check the pin numbering that you are using. Are you using the pin numbers on the Arduino headers? I am using the digital/PWM pins.

Yes, I'm using the numbers printed next to the header pins. The Trackgen firmware uses timer_2 as part of the sweep function, but using the PWM pin is not a problem as the timer PWM outputs are not used.

I see your using an AD9850. I'll check again to see if there are any differences in the programming requirements. As far as I know, the only difference between the two, is that the AD9851 requires an extra register bit to be set to enable a clock multiplier. As I've only ever tested the code on an AD9851, it is possible there is something else that is stopping the AD9850 from working. I'll double-check and get back to you.

Reason: No reason

SteveAndrew
Posts: 119
Joined: Thu Nov 16, 2017 11:06 pm
Location: Gold Coast, QLD, Australia

Re: Feedback for version 0.9a here

Postby SteveAndrew » Sun Jun 24, 2018 6:40 am

Hi Don

I've had a good gook at the differences between the AD9850 and the AD9151. The only difference I could find was the use of a clock multiplier bit being set for the AD9851, and a different clock frequency being used. The different clock frequency would have resulted in an incorrect frequency being output, but you should have still seen an output of some sort. I've made up four HEX files for the Arduino. These are for the Uno and the Mega2560, each one has a version for the AD9850, and the AD9851. I cannot vouch for the files written to support the AD9850, as I don't have a module available at the moment to test the code with. I've just ordered one off Ebay, but that can take 2-3 weeks to arrive from China or Hong Kong.

I've changed the code so that when powered up, the DDS is set to a default frequency of 1MHz. The 30Hz was some legacy stuff that managed to sneak in without me spotting it. If you use a terminal to check your Arduino, "Version" will return Trackgen V1.1 followed by data that indicates the board and DDS it is written to support. For example -"Trackgen V1.1-Uno-AD9850" - This version information will show up in the text window in the tracking generator panel in the analyser when you connect to the Arduino. Let us know how you get on. If you still have problems, I'm afraid you'l have to wait until I can get an AD9850 module.

Arduino_HEX files.zip
(43.15 KiB) Downloaded 57 times

Reason: No reason

K9AQ
Posts: 28
Joined: Sat Jan 14, 2017 1:20 am

Re: Feedback for version 0.9a here

Postby K9AQ » Sun Jun 24, 2018 5:51 pm

Steve,

Thanks for all of your help with this, but it still doesn't work. I have only tested in on the Mega. I suspect it is some problem with the AD9850. I will order a 9851. I will be off the forum for at least the next month. When I get home I will start testing again with the AD9851.

Don

Reason: No reason

Kees_01
Posts: 21
Joined: Fri Jun 15, 2018 7:05 am

Re: Feedback for version 0.9a here

Postby Kees_01 » Sun Jun 24, 2018 5:55 pm

Hi Steve,

Is it easy to store the peak trace values?
If you connect a frequency source to the SAS and doing two sweeps capturing the peaktrace and substract them you have a normalised trace.
Then when you connect the DUT in between you have directly the insertionloss/gain of the DUT on the screen.

SteveAndrew wrote:For example -"Trackgen V1.1-Uno-AD9850" - This version information will show up in the text window in the tracking generator panel in the analyser when you connect to the Arduino.

FYI. I have checked the UNO_HEX file for the AD9851. I read in the Trackgen-box "Trackgen V1.1-Uno-AD9851" and I measure also 30 Hz when the AD9851 DDS is switched on.

Reason: No reason

K9AQ
Posts: 28
Joined: Sat Jan 14, 2017 1:20 am

Re: Feedback for version 0.9a here

Postby K9AQ » Sun Jun 24, 2018 7:14 pm

Steve had said that he changed the default output frequency from 30hz to 1mhz. I ordered a package of two new DDS modules: AD9851 and AD9850.

Don

Reason: No reason

SteveAndrew
Posts: 119
Joined: Thu Nov 16, 2017 11:06 pm
Location: Gold Coast, QLD, Australia

Re: Feedback for version 0.9a here

Postby SteveAndrew » Sun Jun 24, 2018 11:12 pm

K9AQ wrote:Thanks for all of your help with this, but it still doesn't work. I have only tested in on the Mega

A stupid question, and I'm sure you've already checked this: If you're using the Mega, have you checked that you are using the same pins that are reported if you enter GETPINS on a terminal. The only reason I ask is because I spent a pleasant hour yesterday trying to find why my test system had stopped working. I was using the Mega, and somewhere along the line, I had plugged the AD9851 into it, using the Uno pin numbers :oops:
These things happen.

I've ordered an AD9850 and I'll get testing when it arrives. In the meantime, I hope your trip is a good one.

Reason: No reason

SteveAndrew
Posts: 119
Joined: Thu Nov 16, 2017 11:06 pm
Location: Gold Coast, QLD, Australia

Re: Feedback for version 0.9a here

Postby SteveAndrew » Sun Jun 24, 2018 11:50 pm

Kees_01 wrote:FYI. I have checked the UNO_HEX file for the AD9851. I read in the Trackgen-box "Trackgen V1.1-Uno-AD9851" and I measure also 30 Hz when the AD9851 DDS is switched on.

I've just double-checked by downloading the ZIP package, and installing the Trackgen_Uno_AD9851 file. The startup default frequency is running at 1MHz. I checked the frequency by using a digital scope (checked I was not looking at an alias), by running the analyser, and then running SDRuno with an RSP2 and an RSPduo. Very odd that you say you get 30Hz. I have no explanation for that. I can only suggest you check the startup frequency using a radio.

Kees_01 wrote:Is it easy to store the peak trace values?
If you connect a frequency source to the SAS and doing two sweeps capturing the peaktrace and substract them you have a normalised trace.
Then when you connect the DUT in between you have directly the insertionloss/gain of the DUT on the screen.

Yes, this would be possible. I was using a similar system in the Trackgen module for normalisation of the generator output, this was part of the calibration routine for a DDS or noise generator module. I had to disable it as the tracking function had problems. These have now been rectified and should be available in the next release.

Reason: No reason

K9AQ
Posts: 28
Joined: Sat Jan 14, 2017 1:20 am

Re: Feedback for version 0.9a here

Postby K9AQ » Mon Jun 25, 2018 12:43 am

Steve,

I have checked the wiring against the pin info from Trackgen and it is correct. I also put the same pin numbers in the Arduino AD9850 test sketch and it works. The author of the test sketch said it was modified from an AD9851 sketch, so there must be some change required. I wasn't able to add the Arduino sketch as an attachment, so I put it in here for you to look at.

/*
* A simple single freq AD9850 Arduino test script
* Original AD9851 DDS sketch by Andrew Smallbone at www.rocketnumbernine.com
* Modified for testing the inexpensive AD9850 ebay DDS modules
* Pictures and pinouts at nr8o.dhlpilotcentral.com
* 9850 datasheet at http://www.analog.com/static/imported-f ... AD9850.pdf
* Use freely
*/

#define W_CLK 31 // Pin 8 - connect to AD9850 module word load clock pin (CLK)
#define FQ_UD 27 // Pin 9 - connect to freq update pin (FQ)
#define DATA 25 // Pin 10 - connect to serial data load pin (DATA)
#define RESET 23 // Pin 11 - connect to reset pin (RST).

#define pulseHigh(pin) {digitalWrite(pin, HIGH); digitalWrite(pin, LOW); }

// transfers a byte, a bit at a time, LSB first to the 9850 via serial DATA line
void tfr_byte(byte data)
{
for (int i=0; i<8; i++, data>>=1) {
digitalWrite(DATA, data & 0x01);
pulseHigh(W_CLK); //after each bit sent, CLK is pulsed high
}
}

// frequency calc from datasheet page 8 = <sys clock> * <frequency tuning word>/2^32
void sendFrequency(double frequency) {
int32_t freq = frequency * 4294967295/125000000; // note 125 MHz clock on 9850
for (int b=0; b<4; b++, freq>>=8) {
tfr_byte(freq & 0xFF);
}
tfr_byte(0x000); // Final control byte, all 0 for 9850 chip
pulseHigh(FQ_UD); // Done! Should see output
}

void setup() {
// configure arduino data pins for output
pinMode(FQ_UD, OUTPUT);
pinMode(W_CLK, OUTPUT);
pinMode(DATA, OUTPUT);
pinMode(RESET, OUTPUT);

pulseHigh(RESET);
pulseHigh(W_CLK);
pulseHigh(FQ_UD); // this pulse enables serial mode - Datasheet page 12 figure 10
}

void loop() {
sendFrequency(7.0e6); // freq
while(1);
}

Reason: No reason

SteveAndrew
Posts: 119
Joined: Thu Nov 16, 2017 11:06 pm
Location: Gold Coast, QLD, Australia

Re: Feedback for version 0.9a here

Postby SteveAndrew » Mon Jun 25, 2018 4:59 am

K9AQ wrote:I have checked the wiring against the pin info from Trackgen and it is correct. I also put the same pin numbers in the Arduino AD9850 test sketch and it works. The author of the test sketch said it was modified from an AD9851 sketch, so there must be some change required.

The only differences are that the AD9851 includes a clock multiplier enable bit that must be set in the control byte. The other difference is the AD9850 uses a clock frequency of 128MHZ, and the AD9851 a clock frequency of 180MHz.

I've attached a zipped sketch for you that is basically the DDS driver code from my Trackgen module, with all the tracking and command parsing cut out. It will compile for the Uno or Mega2560, and the AD8950, or AD9851 - You just need to comment out the appropriate defines in DDS_tracking.h

If you check the code, you'll see where the differences are handled for the two DDS devices. Due to time restraints (and lack of an AD9850), I've only been able to test it with an AD9851 on the Uno, but it works. Any problems, let me know.

Don_DDS_Test.zip
(2.73 KiB) Downloaded 47 times

Reason: No reason


Return to “Spectrum Analysis”

Who is online

Users browsing this forum: No registered users and 2 guests