Changing the processor allows you to play with the control code of the kit and add extra features, as well greatly adding to your knowledge of microprocessor control techniques
Programming a Picaxe chip is a remarkably simple process, and uses the 3 programming pins provided next to the microprocessor socket, which are not used if the preprogrammed 16F873A is fitted
The code for the PICAXE 28X2 is in simple BASIC format and has been prepared using the "Programme Editor 5" from Revolution Education. This simple to drive FREE piece of software will program and modify the code in any PICAXE chip. and is either known as the "Programming Editor 5 " or Picaxe Editor 6.1 depending on the version
Use the following link to get it........Revolution EducationNow change your crystal from 20MHz to 16MHz. Any crystal will do, as the displayed frequency can be adjusted to read correctly using sofware changes shown below.
Next, you must interconnect your computer to the analyser and a cable is required. There are two ways to do this, either with a 3 wire cable from your COM1 serial port (details below), or via a USB connection. It is firmly recommended that a standard serial port is used to load the Picaxe chip. If you must travel the unreliable USB route,then make sure that you buy the programming cable from Revolution Education, or at least purchase a conversion cable with a genuine FTDI chipset. Many (most) USB to serial cables on the market use counterfeit Chinese chipsets which do not fully implement the conversion between USB and serial standards, and/or have dodgy driver software.You will consequently find that you are in more trouble than can be believed!!
Another and probably cheaper way than USB is to buy a genuine serial card for your desktop.
The next step is to download the BASIC code for the Picaxe28X2 from this link, and copy and paste it into a text editor (Notepad or similar) giving it the name "9018Code.bas"
Interconnect your computer with the Analyser using your chosen cable and also connect a 12 volt dc supply to the analser main pcb, but do not switch on yet. Open the "Programming Editor" and select the 28X2 processor. Load the Picaxe code file into the "Programming Editor" and switch on the 12VDC supply to the analyser. Next click on "program" and watch as the code is squirted into the Picaxe. If all is well, the LCD should come alive, displaying figures. That's it!!
The following section of code will display your call sign or some other message at start up. It should be typed up in Notepad or a similar text editor.
b0=0
loop12:
lookup b0,("VK5JST"),b1
b0=b0+1
gosub wrchr
if b0<6 then loop12
pause 6000
Almost any 16MHz crystal can be successfully used in the clock circuit of this analyser. To make the frequency displayed on the LCD read correctly, simply adjust the constants "8192" and 819 in the lines of the code shown below.
count C.3,8192,w0 'Frequency counter routine. 5 digit resolution
count C.3,819,w0 'Frequency counter routine. 4 digit resolution
Modify these lines to be found in the code section "MEASURE AND DISPLAY FREQUENCY" using the "Programme Editor" and load the code into the Picaxe as previously detailed.
The onboard 5 volt regulator is used as the reference against which battery voltage is measured and has a +/- 5% tolerance To make the LCD display of battery voltage read correctly, open the file "9018Code.bas" in the "Programming Editor" and adjust the constant in the line w2=w2/100 below to somewhere between say 95 and 105. Load the code into the Picaxe as previously detailed.
battery:
readadc A.3,b0 'External resistors are scaled to give a resulting
'count of around 120 for a 12volt battery-33K from +12volt to
'adc input 3 and 8K2 from adc input 3 to ground.
w2=b0*100 'adjust the adc count by multiplication and then division so that
w2=w2/100 'the display shows the correct voltage - change say division only
w3=w2/100 'Derive individual digits for display
w4=w2//100
w4=w4/10
w5=w2//10