Burnette QBF Generator rebirth

Paix

Senior Member
http://www.picaxeforum.co.uk/showthread.php?21460-ASCII-test-generator&highlight=ascii

Correct title ASCII Test Generator - sorry Ray.

I have been playing with Ray Burnette's Picaxe 08M2 Quick Brown Fox Generator. Thank you Ray.
I have modified the codet to send a callsign ident with a serial number and a replacement short fixed length message – Not the QBF one of course. Tinkered with in the well established tradition of the forum.

The purpose of the device is ultimately to key up and send a beacon from an Amaterur Radio trancseiver. The purpose being to activate a cross band talk through unit from a mobile vehicle for transmission coverage testing purposes.

Picaxe 08M2 Pin C.1 goes high to operate an LED during breadboard testing or the input to an opto isolator, with current limiting resistor, naturally. The output of the opto isolator will pull down the PTT line of the transceiver, prior to, during and shortly after the message transmission interval.

During the breadboard testing period using the PE Monitor I am using an inverted data signal, but wish ultimately to key an AFSK oscillator, which I had hoped to implement using a second 08M2 Picaxe chip to provide appropriate 2125Hz and 2295Hz, 2550Hz or 2975Hz tones depending on the shift required for the final device.

An alternate option is to either use Morse or a combination of Morse and (ASCII, or ITA2) telegraph data permitting automated or manual assets to monitor the progress.

Through the auspices of the PE and HSERSETUP and HSEROUT, in lieu of SEROUT, I have the telegraph speed down to 300 Baud
HSERSETUP 3332, %10010
, with every prospect of being able to take it down to 50 Baud
HSERSETUP 1999, %10010

I was hoping to key the output data and a mode line to an 08M2 running at 32MHz(?) to generate
pwmout pwmdiv16, 2, 234, 471 ; 2125Hz Mark tone
pwmout pwmdiv16, 2, 167, 336 ; 2975Hz Space tone
or
pwmout pwmdiv16, 2, 103, 208 ; 600Hz MCW tone
pwmout 2, off
The MCW option is OK, but two tone keying has phase discontinuity that is audible when the tones change, some transitions being more noticeable than others. I may get away with a dirty telegraph signal at 50 baud with a bit of filtering, but does anyone have any good ideas of how I might synchronise the change over of the pwmout signals even if it means a 'very slight' distortion of the telegraph elements?

Modified code and a quick diagram is about a week away, but you can have snippets if you wish.
 
Last edited:

mrburnette

Senior Member
Correct title ASCII Test Generator - sorry Ray.
Thanks for the chuckle, Paix. There seems to be a good Amateur representation in the Forum, so maybe someone will have some helpful ideas. In the just for grins department, you may want to look over how the temperature Orb in my most recent Blog sends the temperature as Morse code. The technique is (I believe) very flexible although I know there are many others who have implemented repeater IDs using PIC(AXE) chips. Magic Morse is explained in some detail here: http://www.picaxeforum.co.uk/entry.php?30-Notes-behind-Magic-Morse

- Ray
 

Paix

Senior Member
@Ray, Yes, I have followed things for the last year or so after a fairly dormant start to my PICAXE interest back in 2008.

I followed amateur RTTY development up until around 1974 and was amazed at one point that my thinking was pretty much mainstream, then the inevitable happened and I saw a lot of red shift as the technology moved away from me at an increasingly greater speed.

It seemed that in the days of 850Hz wide shift that just keying the tones was good enough, but as the then narrow shift of 425Hz became popular, there came with it a movement to maintain the phase integrity of the AFSK oscillator in order to increase the spectral purity of the transmitted signal. Presumably to improve the margin of readability at source.

At the time I thought that 88mH torroids were here to stay and failed to realise that they were the product of change in the industry that we were capitalising on at that time. I was relatively young then and didn't think over much about the bigger picture.

The talk-through-box is a cross-band repeater with fairly simple switching and quite unlike a repeater per se, in that it is less robust and essentially two transceivers back to back, used as a tactical device by RAYNET groups to extend coverage on an ad hoc basis. It requires a group to apply for a permit which is near enough a NoV (Notice of Variation) on the licence, to be able to use it legally in the UK. The problem is to map effective coverage when the box is situated at one of several locations. The easy way is to go mobile with a 2m and a 70cm transceiver each set to 5W output and key each in turn at intervals. There being no microphones involved, receipt of the signal is hands free and someone merely needs to note where they are from time to time so that a list of serial numbers equates to locations. Any missing serial numbers would suggest that a particular location is perhaps sub optimal. Because any signals received will have come from the talk through box, then both receiver sides could be either recorded or fed to a PC to decode the data and write to a log which could be quickly analysed later, probably a job for a bit of Bash and AWK. First I have to put the PICAXE side of things together. Morse would be for a manual system of course, lead based on a cellulose substrate :) Magic Morse might be another contender but more ambitious than the lead based system.

Ian – G0PAi (Wanted the user name Pai, but it was too short so Paix was a second choice the x being a filler character).
 

mrburnette

Senior Member
@Pai(x) ... thanks. My old school bud is a Ham and I get some info and knowledge through osmosis, I am simply not knowledgeable of much in the HF area since I left active duty in the early 70's when I was in a signal group for various ground radio and digital voice. Careers got in the way and family demands, and such. The talk-through-box is a technique that I was unaware.

Ray
 

hippy

Technical Support
Staff member
How many can guess what I'm about to mention ? That little bit of magic inside the M2's called the Data Signal Modulator (DSM) designed just for such jobs :)

14M2 at 4MHz generating FSK 2125Hz/2975Hz modulated by the HSEROUT at 300 baud. Might be the wrong way round for frequencies but, meh!

Code:
#Picaxe 14M2

' Serial Out on B.0
' 2125Hz Out on B.2
' 2975Hz Out on B.4
' FSK    Out on C.1

HserSetup B300_4, %000

PwmOut pwmdiv4, B.2, 117, 235  ; 2125Hz Mark tone
PwmOut pwmdiv4, B.4, 83,  168  ; 2975Hz Space tone

PokeSfr $FC, %11000000 ; SFR $39C MDCON
PokeSfr $FD, %00001010 ; SFR $39D MDSRC
PokeSfr $FE, %00000110 ; SFR $39E MDCARL
PokeSfr $FF, %00000111 ; SFR $39F MDCARH

Do
  HSerOut 0,("U")
  Pause 1000
Loop
There are some glitches on the change over but there is a synchronise mode ( bit 5 set in MDCARL / MDCARH ) which might help make things nicer.

Needs two PWMOUT channels for FSK so 18M2 and 20M2 might be usable but didn't test. The 08M2 only has one PWMOUT so limited to 'pulsing and static high/low' which seems to be your "MCW".

First attachment without sync set, second with both set. Because the DSM doesn't restart the PWM on the changeover it will never be absolutely perfect but should have minimal glitches in it.
 

Attachments

Paix

Senior Member
Many thanks Hippy, that sounds excellent.

I have both 08M2 and 18M2 chips and would like to keep my inventory pretty much that way, but I will order up a couple of 14M2 tonight to implement your code directly and incorporate it into the Collective!

My powers of deduction suggest that the mapping to 18M2 might be:
14M2 18M2
B0 := B5 serout
B2 := B3 Mark
B4 := B6 Space
C1 := ?? AFSK out ( I can search with an earphone as well as the next man!)

From previous reading I seem to think that the SFR operation is relatively consistent across the 08M2, 14M2 and 18M2 range?

I'll see if I can't find the treatise on the M2 DSM in the documentation for myself, as it seems worth killing a few brain cells to try and get a grasp of some of the finer points. Frequencies upside down are, as you say of no great consequence; it's the principles that matter.

You never fail to come up with the goods. I'm grateful.
 

hippy

Technical Support
Staff member
Working code for the 18M2 below. The MDOUT pin is shared with and overrides PWMOUT B.3 but it works okay.

Code:
#Picaxe 18M2

' Serial Out on B.5
' 2125Hz        N/A
' 2975Hz Out on B.6
' FSK    Out on B.3

HserSetup B300_4, %000

PwmOut pwmdiv4, B.3, 117, 235  ; 2125Hz Mark tone
PwmOut pwmdiv4, B.6, 83,  168  ; 2975Hz Space tone

PokeSfr $FC, %11000000 ; SFR $39C MDCON
PokeSfr $FD, %00001010 ; SFR $39D MDSRC
PokeSfr $FE, %10100100 ; SFR $39E MDCARL
PokeSfr $FF, %00100101 ; SFR $39F MDCARH

Do
  HSerOut 0,("U")
  Pause 1000
Loop
 
Top