PLL frequency synthesizer

konczakp
Sun Aug 07, 2016 10:30 am
Hi,

I’m trying to run a pll frequency synthesizer board like this : http://www.ebay.pl/itm/172076128477?_tr … EBIDX%3AIT

I’m doing it on maple mini without any bootloader connected like this:

#define ADF_CLK PB13 // Serial Clock Input
#define ADF_DATA PB15 // Serial Data Input
#define ADF_CE PC13 // Chip Enable
#define ADF_MUX PC14 // Multiplexer Output
#define ADF_LE PC15 // Load Enable


Pito
Sun Aug 07, 2016 10:46 am
1. print out to serial all the values you calculate and double check them (all 160 config bits)
2. get a logic analyzer (ie Open Bench Logic Sniffer) and double check your signals are ok
3. read the datasheet over and over again
4. do not expect to get it working during one short summer night :D

ahull
Sun Aug 07, 2016 11:41 am
I would start by checking your power supply. What you describe seems a little random to be caused by garbage data.

Break the task down into smaller parts. Ensure the devices is stable (stable off, on or whatever) before you start trying to talk to it.

You will almost certainly need access to a logic analyser or oscilloscope to make progress. I haven’t played with this particular device, but it looks interesting, what is the ultimate objective, what do you intend doing with it?


RogerClark
Sun Aug 07, 2016 12:33 pm
your delay function looks problematic, the compiler may optimize it out

Pito
Sun Aug 07, 2016 8:29 pm
Even with zero delays it may work as the bitbanging is slow.
Double check a) polarity of the clock edges, b) whether you shall shiftout MSB or LSB first..

I would simplify your code a bit, for example:
58 Reg_Buf[3] = 0x00;
59 Reg_Buf[2] = 0x58;
60 Reg_Buf[1] = 0x00; //write communication register 0x00580005 to control the progress
61 Reg_Buf[0] = 0x05; //to write Register 5 to set digital lock detector
62 WriteToADF4350(4,Reg_Buf);


RogerClark
Sun Aug 07, 2016 11:29 pm
I’m not sure why you didnt just try using the code posted in the blog article which you linked to

They use SPI rather than bit banging, which seems the logical thing to do.

I know you would need to do some porting, but I suspect it would be less work and lower risk thank writing it yourself from scratch


konczakp
Mon Aug 08, 2016 11:05 am
Hi everyone! Thanks for all replies! Here is what I have done:

@Pito
I am checking everything line by line in code and in documentation, I have printed out all variables and registers and I’m in progress of checking them with docs and I also ordered logic analyser (waiting for it to come) but I have to be honest and say that I’ve never worked with this device but I’m ready to learn :) Pito I haven’t even dream to get this working during one short summer night because I have already spent a week on it :/ I will check Your code modification propositions after I will verify every variable etc. – thanks for that.

@Ahull
I have checked the power supply and I have even changed it few times. I thing this is not a problem because chip is responding for High and Low signals to get it off and on.

@RogerClark
I was trying to change this delay. I’ve tried to use normal delay function from arduino and also tried without any delays as Pito suggested but without any change. I’m not using the code posted in the blog article because it didn’t work for me. I did modifications but no success.


konczakp
Mon Aug 08, 2016 11:32 am
It’s working!

I have disassembled everything, threw out every connection cable and breadboard, and assembled again with a new cables and a breadboard and it started to work. I have checked every each cable before but one of these was a problem. Now the code from the blog is working just like out of the box. Thanks everyone for help. Sometimes it is like when You ask for help it is starting to work (magic) :)


RogerClark
Mon Aug 08, 2016 11:44 am
Excellent

BTW
That module sounds fantastic. i.e signal generator over such a wide range of frequencies. Ideal for Ham radio as a VFO etc etc


mrmonteith
Tue Aug 09, 2016 4:26 pm
RogerClark wrote:Excellent

BTW
That module sounds fantastic. i.e signal generator over such a wide range of frequencies. Ideal for Ham radio as a VFO etc etc


RogerClark
Tue Aug 09, 2016 9:42 pm
Thanks Michael

I wish my budget would stretch to one of those, but I have just bought a load of other kit, so this one will need to wait :-(


mrmonteith
Wed Aug 10, 2016 1:52 pm
RogerClark wrote:Thanks Michael

I wish my budget would stretch to one of those, but I have just bought a load of other kit, so this one will need to wait :-(


Leave a Reply

Your email address will not be published. Required fields are marked *