To use the PICAXE 18M2 program code, just copy and paste into the Picaxe IDE editor. Please if you are going to use the RF transmission, be sure that your Amateur Radio or Ham Radio licence is valid.
To calculate the 5 byte coding number, use the Analogue devices AD9850 help app on “Analog” website. Be sure the correct DDS board clock reference is used for the DDS unit you are using.
' PICAXE program for a combined "RTTY plus Propagation and Systems Measuring Beacon" is written by Alastair GW0AJU ' PICAXE 18M2 project for RTTY RF beacon message sender for GW4YCT Carmarthen Amateur Radio Society ' RTTY message sent; "RYRYRYRYRY DE GW4YCT QRP BEACON TX" ; coded in HEX values DATA 0,($1F, $0A, $15, $0A, $15, $0A, $15, $0A, $15, $0A, $15, $0A, $15, $04, $1F, $09, $01, $04, $1F, $1A, $13, $1B, $0A, $1F, $15, $0E, $10, $04, $17, $0A, $16, $04, $19, $01, $03, $0E, $18, $0C, $04, $10, $1D, $08, $02) symbol index = b0 symbol char = b1 symbol chip_pin_four = b2 symbol TX_level = b3 symbol output_byte = b4 'symbol sense =b5 'symbol lang=b6 symbol delay_bit = b7 symbol delay_start = b8 symbol delay_stop = b9 symbol delay_tx = w8 symbol bit_pos_zero = b10 symbol bit_pos_one = b11 symbol bit_pos_two = b12 symbol bit_pos_three = b13 symbol bit_pos_four = b14 let chip_pin_four = 0 let TX_level =1 ' For a 45.45baud rate, values are 22ms, thus "delay_start & delay_bit" = 22, "delay_stop" = 33 ' values used are for a 50baud data rate, values in milli-seconds let delay_start = 20 let delay_bit = 20 let delay_stop = 30 ' Transmitter restart delay, value in milli-seconds let delay_tx = 1000 'B.0 to B.7 are outputs for DDS data input dirsB = %11111111 'pinsB = %11111111 'C.0 = FQ_UD low/high, C.1 = W_CLK and C.2 = RESET pulse high, C.3 = scope trigger, C.6 = TX PWR toggle dirsC = %11001111 'pinsC = %11001111 main: pulsout C.2,1 ' reset DDS registers LOW C.6 ' pin15 low for low power 2Watts transmission output top: 'start of RTTY message sending routine and TX power toggle TX_level = 0 'setting TX_level variable LOW C.3' synch mask low for oscilloscope monitoring of TX RTTY logic data gosub sub_logic_one ' logic one space tone to sound transmission intent pause delay_tx' pause to announce TX intent and settle the power level of the TX output ' loop to read data message table of 30 characters for index =1 to 43 ' 43 data characters for RTTY message LOW C.3 HIGH C.3 ' synch mask high for oscilloscope synch trigger 'reading the RTTY message data for transmission ' readtable index,char read index,char gosub sub_logic_zero pause delay_start ' conversion from Hex to binary values for logic bit test ' transmission of the RTTY binary data, ' Transmission start sequence bit0 first and bit4 last bit_pos_zero = char AND $01 ' test bit zero ' logic sense routine if bit_pos_zero = $00 then gosub sub_logic_zero else bit_pos_zero = $01 gosub sub_logic_one endif pause delay_bit bit_pos_one = char AND $02 ' test bit one ' logic sense routine if bit_pos_one = $00 then gosub sub_logic_zero else bit_pos_one = $02 gosub sub_logic_one endif pause delay_bit bit_pos_two = char AND $04 ' test bit two ' logic sense routine if bit_pos_two = $00 then gosub sub_logic_zero else bit_pos_two = $04 gosub sub_logic_one endif pause delay_bit bit_pos_three = char AND $08 ' test bit three ' logic sense routine if bit_pos_three = $00 then gosub sub_logic_zero else bit_pos_three = $08 gosub sub_logic_one endif pause delay_bit bit_pos_four = char AND $10 ' test bit four ' logic sense routine if bit_pos_four = $00 then gosub sub_logic_zero else bit_pos_four = $10 gosub sub_logic_one endif pause delay_bit ' TX Mark tone and pause for 30ms for a 1.5 bit stop bit gosub sub_logic_one pause delay_stop LOW C.3 ' synch mask low for osciloscope synch trigger reset next index ' jump to top of loop for next data character 'end of message routine and tx power adjustment level 'gosub sub_logic_one ' end of TX message and send a logic one transimssion tone pause delay_tx ' TX pause logic zero tone before repeat of RTTY message if chip_pin_four = 0 then gosub subtxh if TX_level =1 then goto top 'TX power level changed, goto top to restart message if chip_pin_four = 1 then gosub subtxl ' end of subroutine for power level adjustment goto top ' for continual repeat of message, goto start of message send end stop ' subroutine for TX power level 2/4Watts toggle subtxh: IF chip_pin_four = 0 then high C.6 Endif 'setting TX power level to 4Watts chip_pin_four = 1 TX_level = 1 return subtxl: if chip_pin_four = 1 then low C.6 Endif' setting TX power level to 2Watts chip_pin_four = 0 return ' Logic zero space tone carrier ' RF carrier output = 7.061275MHz, 000E76244AHex sub_logic_zero: LOW C.7 ' serial rtty output LOW C.0 ' FQ_UD low LET pinsB = $00 ' DDS W0 pulsout C.1,1 LET pinsB = $0E ' DDS W1 pulsout C.1,1 LET pinsB = $76 ' DDS W2 pulsout C.1,1 LET pinsB = $24 ' DDS W3 pulsout C.1,1 LET pinsB = $4A ' DDS W4 pulsout C.1,1 HIGH C.0 'FQ_UD High return ' Logic one mark tone carrier ' RF carrier output = 7.061445MHz, 000E763B1BHex sub_logic_one: HIGH C.7 ' serial rtty output LOW C.0 ' FQ_UD low LET pinsB = $00 ' DDS W0 pulsout C.1,1 LET pinsB = $0E ' DDS W1 pulsout C.1,1 LET pinsB = $76 ' DDS W2 pulsout C.1,1 LET pinsB = $3B ' DDS W3 pulsout C.1,1 LET pinsB = $1B ' DDS W4 pulsout C.1,1 HIGH C.0 ' FQ_UD High return