Difference between revisions of "ADF435x PIC"
(→PCB) |
|||
(12 intermediate revisions by 3 users not shown) | |||
Line 28: | Line 28: | ||
The circuit is very simple - a single 12F629 PIC with Clk, Data, LE and mux connections to the ADF board - note CE is connected to +ve supply which can be obtained from the ADF board if available. | The circuit is very simple - a single 12F629 PIC with Clk, Data, LE and mux connections to the ADF board - note CE is connected to +ve supply which can be obtained from the ADF board if available. | ||
− | [[File:adfcontroller.JPG| | + | [[File:adfcontroller.JPG|800px]] |
A blank PCB for this project is now available from [https://batc.org.uk/shop/hardware-and-kits the BATC shop]. | A blank PCB for this project is now available from [https://batc.org.uk/shop/hardware-and-kits the BATC shop]. | ||
− | [[File: | + | [[File:G7DOE Layout.jpg|960px]] |
[[:File:adf435x.zip]] contains the Gerber files for the V2 pcb. These are bundled to suit OSH Park's naming conventions but should also suit various Chinese fabricators. | [[:File:adf435x.zip]] contains the Gerber files for the V2 pcb. These are bundled to suit OSH Park's naming conventions but should also suit various Chinese fabricators. | ||
Line 48: | Line 48: | ||
Note that you cannot program a 12F629 ON the V2.0 PCB; it needs 5V to progam the chip, but the 12F629 will run happily off 3V. | Note that you cannot program a 12F629 ON the V2.0 PCB; it needs 5V to progam the chip, but the 12F629 will run happily off 3V. | ||
− | === | + | ===Generating your own PIC code for new frequencies=== |
− | + | On page 27 in CQ-TV 259 (spring 2018) Dave G8GKQ produced a guide to generating your own PIC code for the ADF4351. Members can find this issue for download here https://batc.org.uk/cq-tv/cq-tv-download/ and a low resolution copy is available here [[:File:CQ-TV 259 page 27.JPG]] | |
− | + | In summary: | |
+ | * Download and run the ADF software - this program is used to generate the correct hew codes that you then put in to Ron's PIC program. | ||
+ | * To get started, go to the registers tab and copy the values out of the line beginning "unsigned long registers" from Ron's .C programs (download link above) | ||
+ | * Go to the main controls tab and make sure the frequency and ref etc are set to 437MHz ans 25 MHz. | ||
+ | * If yes, change the frequency and reference etc to suit your needs. | ||
+ | * Cut and paste the new hex values back in to the C program and save under a different name. | ||
+ | * Run the compiler and programmer on the new file as described in Steve's guide below. | ||
===Code Compilation and PIC Programming Guide=== | ===Code Compilation and PIC Programming Guide=== | ||
− | + | Once you have downloaded Ron's C code or generated some of your own you will need to compile and program in to a PIC. This done using MPLABX\v3.51 downloaded free from Microchip. When compiled, the package directly programs the PIC using PICKit 3. The compiler is XC8 which is also downloaded from the same site and integrates with MPLABX IDE: http://www.microchip.com/mplab/mplab-x-ide | |
+ | |||
+ | Steve M0SKM has written a Compilation and Programming guide in .pdf format. Hopefully this guide will encourage others to build these very useful oscillators. | ||
When Steve first tackled this project he looked around for software and learned it from scratch. Others will undoubtedly find alternative methods but this way worked for him. Thanks also to Claudio I2NDT who test ran the guide successfully. | When Steve first tackled this project he looked around for software and learned it from scratch. Others will undoubtedly find alternative methods but this way worked for him. Thanks also to Claudio I2NDT who test ran the guide successfully. | ||
The guide can be downloaded here [[:File:7-band local oscillator.pdf]]. | The guide can be downloaded here [[:File:7-band local oscillator.pdf]]. | ||
+ | |||
+ | ===Using a Chinese Pickit 3=== | ||
+ | |||
+ | If you have bought a replica Pickit 3 from an auction site, this video has got some very useful information on how to use it. https://www.youtube.com/watch?v=hSkmPyhopRk | ||
+ | |||
+ | If you do not want to download the large MPlab suite but just need a Pickit 3 programmer, this post on the MPlabs forum has a link to a download - note use the 2nd link as the first does not work: https://www.microchip.com/forums/m739890.aspx | ||
+ | |||
+ | Picture shows the correct orientation for a PICKIT3 for in-circuit programming with this project board and pins with a right angle bend. Using the ribbon cable supplied with PICKIT3 was unsuccessful. | ||
+ | |||
+ | [[File:20191002_PICKIT3_FITTED_TO_PROJECT_BOARD.jpg|200px]] Direct connection worked well at M0YDH. |
Latest revision as of 17:52, 6 October 2019
The incredibly flexible ADF4351 VCO/PLL chip with a few external components forms a very wide range high stability signal source with a clean output which is programmable from 35 MHz to 4.4 GHz. Such a device would have been unthinkable 10 years and is ideal for user in the ATVers shack as a test signal generator or a local oscillator source for all bands up to 5.6 GHz.
Note: As well as the desired frequency, the boards have a high harmonic content and depending on the application will need filtering on the output.
Ready built and tested boards are readily available from a number of Far Eastern sources on eBay for around £20
Warning: A recent batch of Chinese boards have a 5V regulator fitted instead of the required 3v3 regulator. Please check your board before you apply power. Details here: https://forum.batc.org.uk/viewtopic.php?f=103&t=5375
In CQ-TV253, Ron G7DOE described two PIC-based controllers for Chinese ADF435x boards to provide a configurable local oscillator suitable for DATV or narrow band operation. The PIC holds four frequencies selectable by two small switches, extendible to eight frequencies from three switches if required. It is easy to change the C source code for any appropriate frequencies and the circuit is very simple.
CQ-TV 259 had a step by step guide to generating the code and programming the PIC for any frequency.
There is also a ultra simple controller design for a set and forget a single frequency which can also be used as a microwave band local Oscillator.
PCB
The circuit is very simple - a single 12F629 PIC with Clk, Data, LE and mux connections to the ADF board - note CE is connected to +ve supply which can be obtained from the ADF board if available.
A blank PCB for this project is now available from the BATC shop.
File:adf435x.zip contains the Gerber files for the V2 pcb. These are bundled to suit OSH Park's naming conventions but should also suit various Chinese fabricators.
Source files
File:source.zip contains four C source files:
- fatcontrol.c is the PIC12LF1552 controller offering a choice of 4 frequencies
- fat8sw.c is the PIC12LF1552 controller offering a choice of 8 frequencies
- thincontrol.c is the PIC12F629 controller offering a single frequency
- thin1552.c is the PIC12LF1552 controller offering a single frequency
These files can be edited in a text editor if required before compilation (see below).
Note that you cannot program a 12F629 ON the V2.0 PCB; it needs 5V to progam the chip, but the 12F629 will run happily off 3V.
Generating your own PIC code for new frequencies
On page 27 in CQ-TV 259 (spring 2018) Dave G8GKQ produced a guide to generating your own PIC code for the ADF4351. Members can find this issue for download here https://batc.org.uk/cq-tv/cq-tv-download/ and a low resolution copy is available here File:CQ-TV 259 page 27.JPG
In summary:
- Download and run the ADF software - this program is used to generate the correct hew codes that you then put in to Ron's PIC program.
- To get started, go to the registers tab and copy the values out of the line beginning "unsigned long registers" from Ron's .C programs (download link above)
- Go to the main controls tab and make sure the frequency and ref etc are set to 437MHz ans 25 MHz.
- If yes, change the frequency and reference etc to suit your needs.
- Cut and paste the new hex values back in to the C program and save under a different name.
- Run the compiler and programmer on the new file as described in Steve's guide below.
Code Compilation and PIC Programming Guide
Once you have downloaded Ron's C code or generated some of your own you will need to compile and program in to a PIC. This done using MPLABX\v3.51 downloaded free from Microchip. When compiled, the package directly programs the PIC using PICKit 3. The compiler is XC8 which is also downloaded from the same site and integrates with MPLABX IDE: http://www.microchip.com/mplab/mplab-x-ide
Steve M0SKM has written a Compilation and Programming guide in .pdf format. Hopefully this guide will encourage others to build these very useful oscillators.
When Steve first tackled this project he looked around for software and learned it from scratch. Others will undoubtedly find alternative methods but this way worked for him. Thanks also to Claudio I2NDT who test ran the guide successfully.
The guide can be downloaded here File:7-band local oscillator.pdf.
Using a Chinese Pickit 3
If you have bought a replica Pickit 3 from an auction site, this video has got some very useful information on how to use it. https://www.youtube.com/watch?v=hSkmPyhopRk
If you do not want to download the large MPlab suite but just need a Pickit 3 programmer, this post on the MPlabs forum has a link to a download - note use the 2nd link as the first does not work: https://www.microchip.com/forums/m739890.aspx
Picture shows the correct orientation for a PICKIT3 for in-circuit programming with this project board and pins with a right angle bend. Using the ribbon cable supplied with PICKIT3 was unsuccessful.