'********************************************************************************
'* VK/ZL PICAXE-08M HELLSCHREIBER Sequential Multi-Tone (SM/T) beacon code *
'* Looks capable of storing ~25 chs. on an 08M ZL2APS & VK6HV collaboration. *
'* This demo entirely fills (256/256 bytes) a 08M. Sept 2009/Jan.2010 *
‘* Program may be downloaded from www.picaxe.orcon.net.nz/VKZLHELL.BAS *
'********************************************************************************
REM PC soundcard decode via SPECTRAN V2 "Waterfall" visual display
REM Tweak SPECTRAN auto bright, contrast, speed, gain & palette settings etc to suit
REM NOTE: Feel free to add, change, modify or optimize required.
REM PICAXE tone generating syntax is in form PIN,(SOUND,DURATION)
REM Sound has values 0 (silence) to 128,with output freq =12048/(128.1-sound)
REM So sound =95 output ~12000/(128-95)= 12000/33 =~364 Hz, doubling to 728Hz when 8MHz SETFREQ M8
REM NB – freq. varies slightly with temp. & individual PICAXE internal oscillator calibration.
REM CALIBFREQ +/-30 ( POKE $90 ) conveniently tweaks internal osc. freq.
REM ------------------------------------------------------------------------------------------
Symbol Testbyte = B0
Symbol Column_Numbers = B4
Symbol Character = B8
Symbol Column_Elements = B6
Symbol Column_Bits = B2
Symbol Tones = B10
Symbol Increment = B12
SetFreq M8
Start:
Wait 10 'Message repeat delay-8MHz clock halves value! Use SLEEP (& BOD) etc to enhance battery life
REM Lookup command below accesses your pre-stored message. Modify to suit- pad out with spaces (0)?
REM shows VK.ZL PICAXE "HELL" BEACON - make upper column_number same as number of ch. elements.
For Column_Numbers = 0 to 151 'setting col.number too high repeats last character!
Lookup Column_Numbers,(31,32,64,32,31,0,127,8,20,34,65,0,8,0,97,81,73,69,67,0,127,64,64,64,64,0,0,0,0,0,0,0,127,9,9,9,6,0,65,65,127,65,65,0,62,65,65,65,65,0,124,10,9,10,124,0,65,34,28,34,65,0,127,73,73,73,73,0,0,0,0,0,0,1,1,0,127,8,8,8,127,0,127,73,73,73,73,0,127,64,64,64,64,0,127,64,64,64,64,0,1,1,0,0,0,0,0,0,127,73,73,73,62,0,127,73,73,73,73,0,124,10,9,10,124,0,62,65,65,65,65,0,62,65,65,65,62,0,127,4,8,16,127,0,0,0,0,0,0,8),Character
Testbyte = Character
Tones = 95
Increment = 0 'Resets default to 0 after each 5x7 matrix col. sent
Gosub Hellscreiber
Next
Goto Start
Hellscreiber:
For Column_Elements = 1 to 7
Column_Bits = Bit6 '7th bit in Byte B0 (Bit0 - Bit7).
If Column_Bits = 1 Then Gosub ToneON 'Send tone if "Bit6" of Byte B0 = "1",
If Column_Bits = 0 Then Gosub ToneOFF 'else send quiet if "Bit6" of Byte B0 ="0".only bit tested.
Testbyte = Testbyte * 2 'Shift left!
Next Column_Elements
Return
ToneON:
Poke $90, Increment 'CALIBFREQ to bring tones (& thus images) tighter.
Sound 1, (Tones, 15) 'PICAXE tone generating syntax in form pin,(sound, duration)
Bit6 = 0 'Reset Bit6 of Byte B0 to "0" so Hellschreiber: can retest
Increment = Increment + 2 'Increment a value + 1 to be POKEd at $90
Return
ToneOFF:
Poke $90, Increment
Sound 1, (0, 15) 'Sound value of 0 gives silence
Bit6 = 0
Increment = Increment + 2 'Increment a value +1 to be POKEd at $90
Return
REM -------------------------------------------------------------------------------------
REM Ch.images shown scrolling down the screen "waterfall" style -SPECTRAN horiz. display turns 90°
REM Rt. mouse button click on SPECTRAN display toggles waterfall scroll from downward to leftwards
REM Construct own characters by considering them scrolling downwards -thus N viewed as Z etc
REM Bit6(this is the 7th bit of the 8bit byte, of Byte B0)
REM |
REM | Last sent Bit0 column 5
REM 5 wide by 7 high matrix | | |
REM V | V
REM Column numbers 1-5 Ex. letter "A" = 124 - *1111100 ##### V #
REM #1 #2 #3 #4 #5 10 - *0001010 # # # #
REM [ 1][ 1][ 1][ 1]((1)) (Bit0 9 - *0001001 thus => # # # #
REM [ 2][ 2][ 2][ 2][ 2] (Bit1) 10 - *0001010 # # # # # # #
REM [ 4][ 4][ 4][ 4][ 4] (Bit2) 124 - *1111100 ##### # #
REM [ 8][ 8][ 8][ 8][ 8] (Bit3) # #
REM [16][16][16][16][16] (Bit4) This is Bit6 of column 1,the first bit sent.--> # #
REM [32][32][32][32][32] (Bit5) Then Bit5 of column 1, then Bit 4 of column 1,
REM (64)[64][64][64][64] (Bit6) Bit3, Bit2, Bit1, Bit0, etc. etc. Then Bit6
REM [ *][*][ *][ *][ *] (Bit7,not used) of column 2, then Bit 5, Bit4 and so on until
REM all 35 bits are "shifted left" through the BIT6
REM of byte B0 location (with appropriate tone or
REM silence) & a complete 5x7 character matrix sent.
REM Bit6 (64) in column #1 is the first
REM bit sent of the 5 x 7 matrix, Bit0
REM ((1)) in column #5 is the last bit sent.
REM -------------------------------------------------------------------------------------------
REM LETTERS: and NUMBERS: PUNCTUATION etc:
REM .
REM A = 124, 10, 9, 10,124 T = 1, 1,127, 1, 1 ! = 0, 0, 95, 0, 0
REM B = 127, 73, 73, 73, 62 U = 63, 64, 64, 64, 63 # = 20,127, 20,127, 20
REM C = 62, 65, 65, 65, 65 V = 31, 32, 64, 32, 31 [ = 0,127, 65, 65, 0
REM D = 127, 65, 65, 65, 62 W = 127, 32, 16, 32,127 ] = 0, 65, 65,127, 0
REM E = 127, 73, 73, 73, 73 X = 65, 34, 28, 34, 65 \ = 2, 4, 8, 16, 32
REM F = 127, 9, 9, 9, 9 Y = 1, 2,124, 2, 1 / = 32, 16, 8, 4, 2
REM G = 62, 65, 73, 73, 57 Z = 97, 81, 73, 69, 67 " = 0, 1, 1, 0, 0
REM H = 127, 8, 8, 8,127 . = 0, 64, 0, 0, 0
REM I = 65, 65,127, 65, 65 0 = 62, 65, 65, 65, 62 , = 0, 96, 0, 0, 0
REM J = 113, 65, 65,127, 1 1 = 68, 66,127, 64, 64 < = 8, 20, 34, 65, 0
REM K = 127, 8, 20, 34, 65 2 = 121, 73, 73, 73, 70 > = 0, 65, 34, 20, 8
REM L = 127, 64, 64, 64, 64 3 = 65, 73, 77, 75, 49 ? = 0, 1, 89, 9, 6
REM M = 127, 2, 4, 2,127 4 = 15, 8, 8, 8,127 * = 73, 42,127, 42, 73
REM N = 127, 4, 8, 16,127 5 = 79, 73, 73, 73, 49 % = 35, 19, 8,100, 98
REM O = 62, 65, 65, 65, 62 6 = 60, 74, 73, 73, 49 + = 8, 8,127, 8, 8
REM P = 127, 9, 9, 9, 6 7 = 1, 1,121, 5, 3 - = 8, 8, 8, 8, 8
REM Q = 62, 65, 81, 33, 94 8 = 54, 73, 73, 73, 54 = = 20, 20, 20, 20, 20
REM R = 127, 9, 25, 41, 70 9 = 6, 9, 9, 9,127
REM S = 70, 73, 73, 73, 49
REM -------------------------------------------------------------------------------------
REM Ham radio call example.(0,)= space-use one between letters & perhaps six between words.
REM V K 6 H V
REM (31,32,64,32,31,0,127,8,20,34,65,0,60,74,73,73,49,0,127,8,8,8,127,0,31,32,64,32,31)