PSK31 Audio Beacon Kit - njqrp.clubnjqrp.club/psk31beacon/manualv2.pdf · audio amp for use with a...

13
PSK31 Audio Beacon Kit Build this programmable single-chip generator of PSK31-encoded audio data streams and use it as a signal generator, a beacon input to your SSB rig — or as the start of a single-chip PSK31 controller! Created by the New Jersey QRP Club Version 2, July 2001

Transcript of PSK31 Audio Beacon Kit - njqrp.clubnjqrp.club/psk31beacon/manualv2.pdf · audio amp for use with a...

Page 1: PSK31 Audio Beacon Kit - njqrp.clubnjqrp.club/psk31beacon/manualv2.pdf · audio amp for use with a user-supplied speaker for use in group activities. ... 4 The NJQRP “PSK31 Audio

The NJQRP “PSK31 Audio Beacon Kit” 1

PSK31 Audio Beacon Kit

Build this programmable single-chip generatorof PSK31-encoded audio data streams anduse it as a signal generator, a beacon input toyour SSB rig — or as the start of a single-chipPSK31 controller!

Created by the New Jersey QRP Club

Version 2, July 2001

Page 2: PSK31 Audio Beacon Kit - njqrp.clubnjqrp.club/psk31beacon/manualv2.pdf · audio amp for use with a user-supplied speaker for use in group activities. ... 4 The NJQRP “PSK31 Audio

The NJQRP “PSK31 Audio Beacon Kit” 32 The NJQRP “PSK31 Audio Beacon Kit”

PSK31 Audio Beacon Kit

Thank you for purchasing the PSK31Zudio Beacon from the New Jersey QRPClub! We think you’ll have fun assem-bling and operating this inexpensive-yet-flexible audio modulator as PSK31-en-coded data streams.

This project was first introduced as a kitat the Atlanticon QRP Forum in March2001, and then published in a feature ar-ticle of QST magazine in its August 2001issue. Since these initial public exposures,several new capabilities have been addedin “version 2” of the microcontroller soft-ware. This kit embodies this new soft-ware and describes how to use the newfeatures.

And lastly, there were a few typographi-cal errors in the QST article that have beencorrected in this kit. Most notably, thegraphics depicting the PSK31 waveformencoding now properly indicate waveform

phase relationships at bit transitions, andthe schematic has been augmented withhelpful notations.

For the very latest information, softwareupdates, and kit assembly & usage tips,please be sure to see the PSK31 Beaconwebsite at http://www.njqrp.org/psk31beacon/psk31beacon.html . Visitsoon and often, as it’s guaranteed to behelpful!

We really hope you find this Manhattan-style Homebrewing Starter Kit useful ingetting started in your first copper-cladboard project. It’s a fun, quick and flex-ible way to bring your favorite designs tolife!

George Heron, N2APBemail: [email protected]

for the NJQRP Clubat http://www.njqrp.org

Here’s an easy, fun and intriguingly use-ful project that has evolved from an on-going design effort to reduce the complex-ity of a PSK31 controller.

A conventional PC typically providesthe relatively intensive computing powerrequired for PSK31 modulation and de-modulation.

With this Beacon project, however, thePSK31 modulation computations havebeen designed to fit into a small PIC-likemicrocontroller that can serve as the ba-sis for the transmit half of a standalonePSK31 controller.

A fast and inexpensive  microcontrollerhas been programmed to generate an au-dio data stream using the PSK31 algo-rithms.  The data-driven audio waveformis fed to an amplifier IC that drives aspeaker - and voila , the familiar and me-lodious PSK31 warble is able to be heard!When presented as input to a PSK31 re-ceiving system such as DigiPan, thesemodulated audio tones are decoded andthe programmed beacon string is dis-played.

A keyboard or data terminal may alsoserve as the input of real-time textual datato the PSK31 Audio Beacon. A standardRS-232 serial interface is provided in thehardware and software to allow a moredynamic “signal generator” use of theproject.

The project can be electrically con-nected to the input of an SSB transmitterto create an RF PSK31 beacon.

This project is also ideally suited forgroups wishing to have some “audio bea-con” fun during meetings. A number ofclub members would operate their audiobeacons while someone attempts success-ful copy of the beacon strings while sit-

ting at a laptop equipped with DigiPansoftware.

Construction is simple and straightfor-ward and you’ll have immediate feedbackon how your Beacon works when youplug in a 9V battery and speaker.

Beacon Featuresn Single-chip implementation ofPSK31 encoding and audio waveform gen-eration.

n Audio PSK31 tones presented to anaudio amp for use with a user-suppliedspeaker for use in group activities.

n Lower level signal available from chipsuitable for input to an SSB transmitterfor operation as an RF beacon.

n Scenix SX28 RISC microcontrolleroperating at 50 MHz with 20ns instruc-tion cycle time provides computing powernecessary for accurate implementation ofthe PSK31 modulation algorithm. The SXchip is similar to Microchip’s popular PICmicrocontroller, containing the same soft-ware instruction set but operating over40 times faster.

n SX28 microcontroller is programmedwith a unique beacon string, or acceptsreal-time text input from an RS-232 serialinterface.

n Configuration jumpers provide for se-lection of three base carrier frequencies(500 Hz, 1 KHz, or 2 KHz), and choiceof 8 sub-variations around the selectedbase frequency. This allows the user tooperate the Beacon on any of 24 distinctaudio frequencies.

n Configuration jumper provides forBeacon operation in a continuous loop oras a single pass when a pushbutton is

OVERVIEW

U1 SX28AC/DP Scenix microcontroller, 50 MHzU2 LM386 amplifierU3 MAX232CPE Dual RS232 transceiverY1 50 MHz ceramic resonator, Murata 250-05060SKT-1 28-pin IC socketSKT-2 8-pin IC socketSKT-3 16-pin IC socketVR1 7805V voltage regulator, 1AC3 0.1 uF ceramic (“104”)C4,C5,C6,C24,C26 .01 uF ceramic (“103”)C20,C21,C22,C23,C25 1 uF electrolytic, 25V (longer lead is positive)C7 10 uF electrolytic, 25V (longer lead is positive)C8 47 uF electrolytic, 25V (longer lead is positive)C9 100 uf electrolytic, 25V (longer lead is positive)R1,R2 10-ohmR4 10K potentiometerR5,R6,R7.R8,R9,R10,R11,R12,R13 10KR14,R15,R16,R17,R18,R19,R20,R21,R22 20KR3,R4 100KR23 470KJ1 9V battery terminal clipJ2 9-pin RS232 D-style serial connectorPC Board

PARTS LIST

Page 3: PSK31 Audio Beacon Kit - njqrp.clubnjqrp.club/psk31beacon/manualv2.pdf · audio amp for use with a user-supplied speaker for use in group activities. ... 4 The NJQRP “PSK31 Audio

The NJQRP “PSK31 Audio Beacon Kit” 54 The NJQRP “PSK31 Audio Beacon Kit”

actuated.

n Source code and inexpensive devel-opment tools allow custom modificationof the beacon string and/or software op-eration.

n Construction may be done Manhat-tan-style (a form of ugly-style construc-tion) for freedom of desired implementa-tion. A printed circuit board is also avail-able for this project when purchased as akit from the NJQRP Club.

“What Can I Do with a PSK31Audio Beacon?

As mentioned, the Beacon may be usedas the basis for a fun group “contest” ac-tivity for your club. All contestants wouldturn their beacons on and gather around alaptop running the DigiPan application.Laptops generally have built-in micro-phones that would be used to decode theaudio PSK31 tones “in the air” ... andwith over 100 beacons warbling simulta-neously, there will certainly be audio tonesin the air!

Recall that each Beacon’smicrocontroller is customized with acallsign and is run on slightly differentfrequencies.  One Beacon may have itstones centered at 978 Hz, while anothermay have it’s tones at 1050 Hz.  Thisspreading out of Beacon signals will helpwhen multiple beacons are placed in ser-vice at the same time within close geo-graphic proximity.

Okay, so you’ve got the picture of awhole bunch of club members amassedaround a table with an operator sitting atthe laptop running DigiPan, right?  Withina specified period of time, the idea is tosee how many of the Beacons can be cop-ied (callsign & code word), as capturedby DigiPan.  Factors involved in success-ful reception include the settings of theaudio amp, the type of speaker, the dis-

tance between the Beacon and the laptop,adjacent QRM (other Beaconers), etc.“Points” are awarded to all Beacons forthe degree of solid copy captured to theDigiPan log during that 15 minute period. (You can see a photo of this excitement inthe “Up Front” section of July QST. Thephoto was taken at the Atlanticon QRPForum held last spring.)

This all may may sound complex, butit’s really quite simple — build the Bea-con, turn it on and see how well it can becopied by DigiPan.  Each contestant couldactually do this during the test phase athome prior to the club event.

Putting the Beacon on the AirProjects can be fun in a group activity,

but the PSK31 Audio Beacon has lastingvalue for the PSK31 enthusiast.  The au-dio tones generated by the Beacon can bepresented as input to any SSB transmit-ter — a Warbler, PSK-20, PSK-40, or evena Yaesu FT-1000MP.  Thus, a PSKer caneasily put a beacon signal on the air for allthe same reasons that CW beacons areused (e.g., studies of propagation, powerlevels, antenna characteristics, etc.)

Special care must be exercised on twocounts, however.

First, the audio level driving an SSBtransmitter needs to be extremely lowcompared to the output levels providedby the Beacon Kit. Most certainly, theLM386 audio amplifier output that drivesthe Beacon’s speaker should not be usedwhen feeding a transmitter. One shouldtake the output of the R-2R DAC andput it through a voltage divider pad (orpotentiometer) to bring the 0-to-4.5V sinewave signals down to the millivolt rangerequired by an SSB transmitter. The lowerthe better! If the transmitter is over-driven, all sorts of problems occur withthe transmitted RF spectrum – terribleIMD, distortion, and interference to other

signals up and down the band. You willquickly learn the wrath of others seeingyour callsign and email address transmit-ted over and over.

Secondly, even in the case of perfectsignal quality, very careful attended op-eration needs to be done when using thisBeacon project with an RF transmitter.There should be no interference whatso-ever to any other communication on theband, and even while in the CONTINU-OUS mode of operation, the Beaconshould be stopped periodically to deter-mine if other signals are present.

Never leave the beacon on for continu-ous, unattended operation! Unattendedbeacon operation is illegal in the FCC’seyes, and you would not be able to deter-mine if other signals are present in thearea of you transmissions.

CIRCUIT DESCRIPTION

Refer to the Schematic at the center ofthis manual for the following discussion.

DC Power InputThe kit provides a standard battery clip

with which the user can connect a 9V bat-tery. Any DC voltage from about 9-12Vmay be used, as the 3-pin regulator VR1drops the input voltage down to the re-quired 5V for the microcontroller.

Current consumption of the Beaconcircuitry is nominally about 80ma, so theregulator will naturally get a little warm

Note: If an SX-Key programmer is con-nected to the Beacon (allowingreprogrammability of the microcontroller)a TO220-packaged 1A voltage regulatorsuch as the LM7805 should be used dueto the overall higher current demands ofthe programmer.

Scenix SX28 microcontrollerThe Scenix SX28 microcontroller used

in the beacon operates at 50 MHz clockrate, providing an instruction cycle timeof 20 nanoseconds. This fast operationenables precise control of signal genera-tion and phase reversals to produce stableand accurate carrier modulation at the au-dio baseband frequencies. A 50 MHz ce-ramic resonator is used with the on-boardoscillator to provide a fast and simplecontroller solution to the generation ofPSK31 encoding.

Carrier Generation: “R-2R DAC”There are numerous ways to generate a

sine wave suitable for use in communica-tions systems, and each has advantagesand trade-offs. A discrete chip sine wavegenerator or a separate digital to analogconverter (DAC) could have been used,but it was desired to keep both hardwarecomplexity and cost to a minimum.

Another popular method used in gen-erating a sine wave is to pulse width modu-late (PWM) a square wave on an outputbit of the microcontroller and then lowpass filter the signal with an R/C network.This method requires too much use ofprecious interrupt time in the processor.

A simple technique was ultimately cho-sen to generate the carrier - the “R-2RDAC”. This digital to analog converterincorporates a ladder network of 15 re-sistors whose nodes are fed by an 8-bitparallel output port of the microcontroller.The values of the resistors in the networkare 10K- and 20K-ohms, hence the R-2Rnomenclature. The cumulative weightingof these R-2R resistors in the ladder ulti-mately produces an output voltage at thetop of the ladder corresponding to thedesired analog voltage. Thus all the soft-ware needs to do is present the desiredsine wave values in sequence to the out-put port at precise time intervals. Whensmoothed with a capacitor, the resultantwaveform at the top of the resistive lad-

Page 4: PSK31 Audio Beacon Kit - njqrp.clubnjqrp.club/psk31beacon/manualv2.pdf · audio amp for use with a user-supplied speaker for use in group activities. ... 4 The NJQRP “PSK31 Audio

The NJQRP “PSK31 Audio Beacon Kit” 76 The NJQRP “PSK31 Audio Beacon Kit”

der is a clean sine wave.

Audio AmplifierThe output of the R-2R DAC is ac-

coupled to the input of a common LM386audio amplifier through a potentiometerto provide continuous adjustability of theaudio volume.

This amplifier provides significant gainand quite nicely drives a small speaker.

Configuration JumpersFive user-installable configuration

jumpers (X2-X6) instruct the softwareto produce one of 24 distinct carrier fre-quencies that will ultimately be phase-modulated at 31 baud. Input pins of theSX microcontroller are used to read thestatus of these configuration jumpers.These input pins have weak internal pull-up resistors and float “high” when un-connected. However, when grounded byputting a jumper in place, the pin reads“low” and signals the software to takespecific action in configuring the Beacon’sfrequency.

Another jumper (X1) instructs the soft-ware to set a specific interrupt timing thatpermits the software UART in the SXchip to communicate over the RS232 se-rial line with an external computer. Thismode is used for custom beacon stringentry or character-by-character sendingof data.

Carrier Frequency Selectiona) Base Carrier Selection Jumpers - Two

jumpers allow user to configure beaconcarrier signal to any of three frequencies:500 Hz, 1 KHz, or 2 KHz.

b) Carrier Offset Jumpers - Three ad-ditional jumpers allow user to select oneof 8 closely-spaced frequencies aroundthe chosen base carrier

Transmission Mode: Continuousor One-Time

The Beacon may operate in either Con-

tinuous transmit mode, or in One-Timetransmit mode.

a) Continuous transmit is selected byinstalling configuration jumper X7, thusinstructing the beacon software to auto-matically restart the beacon transmit se-quence (idle and pre-programmed datastring),

b) One-Time transmit is selected byremoving the configuration jumper fromX7. The transmit sequence is initiatedby manual actuat ion of theSTARTpushbutton, upon which the idlestream and pre-programmed data stringare sent. The beacon stops transmittingat the end of the data string and awaitseither another STARTpushbutton actua-tion.

Serial Input ModeJumper X1 instructs the software to

use a fixed-time interrupt loop, thus al-lowing the UART routine send and re-ceive serial data with the external termi-nal/computer. It may be convenient to usea SPST toggle switch for this configura-tion line, as it would only be used wheninputting a custom beacon string or whentransmitting keyboard data character-by-character. The switch would be open othertimes during automatic Beacon transmis-sion.

Custom String Entry ModeThe way to initiate entry of a custom

text string is by having the X7 (CON-TINUOUS) jumper in place and holdingdown the START pushbutton while ap-plying power to the board. (You also musthave the X0 jumper in place to signifyuse of the serial COM port, as describedabove). A convenient way to switch theBeacon into this serial-entry mode is towire the X7 and START lines to a DPDTtoggle switch that would ground the re-spective input lines when this mode isdesired.

SOFTWARE DESCRIPTION

Beacon String ConstructThe Beacon software is programmed

to transmit two types of data in sequence:

1) Idle Stream - Upon transmit initia-tion, the Beacon sends a series of 64 ze-ros to allow the PSK31 receiving systemand decoder to synchronize for the datareception that follows. In some PSK31applications this idle stream time allowsthe decoding software to measure signal“IMD”, an indication of energy presentin adjacent sidebands and somewhat of afigure of merit for the received signal.

2) Data String - Immediately followingthe idle stream of zeros, the Beacon be-gins sending the data string that will ulti-mately be displayed on the receiving sideof the communications channel. This isthe custom-programmed sequence ofASCII characters. The data string may beof any length, and is limited only by avail-able memory.

The SX chip provided in this kit comespre-programmed wih the informationspecified in the inital ordering process.This beacon string is “burned” into theprogram memory and is tranferred to in-ternal RAM memory when power is ap-plied. Whenever the START pushbuttonis actuated or the CONTINUOUS jumperput in place, the string in RAM memoryis encoded and audibly transmitted.

Entering Custom Beacon StringsOne may alternatively enter a different

text string directly to RAM memory overthe RS-232C serial COM port providedon the Beacon board. A separate com-puter would typically be used to sendthis new text string to the Beacon. Thenew text is entered character-by-charac-ter into RAM data memory, effectivelyoverwriting the pre-programmed text

string that was put there initially atpower-up time. But since RAM datamemory is volitile (i.e., contents are lostwhen board power is removed), the cus-tom-entered text string is only presentwhile the power is applied. If power iscycled, the custom text string must beapplied again to overwrite the pre-pro-grammed string.

The way to initiate the entry of a cus-tom text string is by having the X7 (CON-TINUOUS) jumper in place and holdingdown the START pushbutton when ap-plying power to the board. You also musthave the X0 jumper in place to signifyuse of the serial COM port. A convenientway to switch the Beacon into this serial-entry mode is to wire the X7 and STARTlines to a DPDT toggle switch that wouldground the respective input lines whenthis mode is desired. The X0 input linecould also be put to a SPDT switch to begrounded for use of the serial port. (Twoseparate switches are recommended forreasons explained in the section concern-ing Direct Character Transmission mode.)

Interrupt TimingFor this part of the discussion, it will

be assumed that the configuration jump-ers are set to produce a 500 Hz carrierfrequency, with a nominal interrupt vari-ability of 4 (X2 jumper in place for anRTCC reload value of 197.)

The PSK31 Audio Beacon software iscompletely interrupt-driven, based on thetimeout settings of the real time clock(RTCC). The default setting of the RTCCcounter produces an interrupt every3.94us and the Interrupt Service Routine(ISR) counts two of these interrupts andthen signals the presence of a 7.88us in-terval by setting the SYNC7US softwareflag. This flag is inspected in a tight loopat the MAIN starting point of the pro-gram, and when detected as being set, the

Page 5: PSK31 Audio Beacon Kit - njqrp.clubnjqrp.club/psk31beacon/manualv2.pdf · audio amp for use with a user-supplied speaker for use in group activities. ... 4 The NJQRP “PSK31 Audio

The NJQRP “PSK31 Audio Beacon Kit” 98 The NJQRP “PSK31 Audio Beacon Kit”

whole program sequence begins.

Creating the Carrier Sine WaveEvery 4th time the 7.88us window

starts (i.e., at the 31.25us boundaries),the software gets the next 8-bit value fromthe sine wave look-up table and outputsit to the DAC output port RB. Whenthis process happens 64 times (i.e., when64 instances of the 31.25us windows haveoccurred) a single sine wave will have beenconstructed within a 2ms time period,creating a 500 Hz carrier.

The software keeps track of how manycarrier cycles have been generated, andwhen the count reaches 15 (i.e., at the31ms interval), the PSK bit window ispresent and the PSK bit processing be-gins.

Actually, the recurring 31ms windowstarts at mid-position of one bit cycle andgoes to mid-position of the next bit cycle.It’s done this way so the software caninspect the current / next bit relationshipand command a zero-power phase rever-sal condition at the next end-bit time pe-riod, if required.

Creating the Phase ReversalsThe bits constituting the Varicode char-

acter being sequentially presented formodulation are inspected on a bit-by-bitbasis at each 31ms bit processing win-dow. When a “1” is encountered, nothingis done in that window. The sine waveconstruction continues

However when a “0” is encountered,the rules of PSK31 modulation state thata phase reversal must be forced in thecarrier.

The processing gets a little more com-plicated at this point because we want toreduce the power of the carrier at the timeof phase reversals. This action greatlyreduces the “glitch” energy at the time ofthe reversals and makes the resultant tones

much more spectrally clean.

A cosine wave look-up table is used tomodulate (or “scale”) the carrier wave,sample by sample at the 31.25us rate.The cosine table pointer is advanced aseach cycle of the carrier is generated.

If the “next bit” of the varicode charac-ter to be processed is a “0”, the scalingprocess is turned on at mid-bit positionand the remaining 7 carrier cycles of wave-form construction occurring in the bit-processing window get scaled per the co-sine look-up table. This effectively bringsthe amplitude of those seven sine wavesprogressively down to zero, at whichpoint the phase of the carrier is reversed(by changing to a different sine wave look-up table — one that is 180-degrees out ofphase from the other one.)

After the phase reversal, the carriercontinues to be constructed at every31.25us interval, and the cosine scaling isstill engaged in sync with the carriercycles. For the next seven cycles, the co-sine look-up table routines scale up thecarrier such that the carrier is back to fullpower (no scaling) by mid-bit position.

All this can be more easily understoodby considering the oscilloscope screenphoto in Figure 1 on the next page.

Here we see 15 cycles of the 500 Hzcarrier constituting a 31ms bit-process-ing window. The sequence of charactersprocessed were two sequential zeros –the first being encoded in the phase rever-sal seen zt the zero-power point on theleft, and the second on the right. Thesepoints are where the sine wave look-uptables are changed, resulting in the obvi-ous phase reversals. It can also be seenthat the cosine “scaling” of the carrierstarts at mid position in the bit-process-ing window and proceeds to zero at theend of the cycle where the reversals oc-

cur. The power is then raised in the fol-lowing 7 cycles of the next window.

Encoding a “T”Using the PSK31 encoding algorithm

for phase reversals (i.e., insert a phasereversal whenever encountering a “0” inthe bit stream), we can begin to considerwhat a composite sequence of bits willlook like for an entire character.

In this example, we’ll look at the letter“T”, which has a Varicode equivalent bitpattern of 1101101. The sketch in Figure2 illustrates what one would see with an

oscilloscope properly synchronized at thestart of the character sequence.

It’s useful at this point to mention thattwo (or more) consecutive “zeros” con-stitute a letter gap, thus instructing thedecoding engine on the receiving side tostart another character processing cycle.

In the diagram below, a letter gap of 0-0 starts off the “T” sequence of bits.Upon encountering each “0”, the powerlevel is brought down to zero and thephase is reversed. The power level is then

Figure 1: Oscilloscope trace of 31.25 ms timing window (square wave onchannel 1) superimposed on the modulated 500 Hz carrier wave on channel 2.

Note phase shifts at the zero-crossings, indicating two successive logical 0’s inthe digital bitstream.

Figure 2: Varicode “T” waveform

Page 6: PSK31 Audio Beacon Kit - njqrp.clubnjqrp.club/psk31beacon/manualv2.pdf · audio amp for use with a user-supplied speaker for use in group activities. ... 4 The NJQRP “PSK31 Audio

The NJQRP “PSK31 Audio Beacon Kit” 1110 The NJQRP “PSK31 Audio Beacon Kit”

raised back up to 100% by mid-next po-sition, whereupon the “next bit” is in-spected to see if another reversal will beneeded.

Upon encountering the first “1”, thealgorithm dictates that no phase reversaloccurs, so the power level remains at 100$(no cosine scaling).

The same happens again upon encoun-tering the second “1”, but the next bitafter that is a “0” and the power level isreduced in anticipation of the comingphase reversal.

One can easily see these principles inaction in the oscillosope trace in figure 3.The phase reversals can be seen at thepoint where the power is reduced to zero,which is at the bit-processing intervals(31ms). The square wave superimposedabove and below the carrier is the 31mssync signal present on the Test Point ofthe processor (bit 3 of port RA.) It canbe clearly seen how the current/next bitprocessing is actually done at the mid-bitposition, halfway through the 31ms pe-riod window

Producing Different FrequencyCarriers

The preceding discussion assumed a500 Hz carrier and a core interrupt timeof 3.94us. With a little software magic,some variability was placed into the pro-gram in order to produce two more basecarrier frequencies, and 16 sub-variationsaround each base frequency.

The interrupt structure and timing isactually designed to produce a 2 KHzcarrier as the highest base frequency, us-ing a 7.88us sine wave construction. Then,based on the state of the configurationjumpers, we’re able to sample at half-ratesto get the 15.75us rate for 1 KHz carriergeneration, and 31.25us rate for 500 Hzcarrier generation.

Achieving the 16 frequency variationsaround each of the three base carrier fre-quencies is achieved by slightly varyingthe basic underlying interrupt timingmechanism.

The Real Time Clock Counter (RTCC)is clocked by the master 50 MHz oscilla-tor internal to the microntroller. Interruptsare generated when the RTCC “rolls over”upon a countdown from a preset value,and the governing mechanism for inter-rupt timing is to preset the RTCC counterat the end of each interrupt cycle. Thenominal value of the RTCC preset is“200”, and we can go as much as +/- 8counts before receiving systems lose syn-chronization with the master 31 baudsystem timing in the Beacon.

Therefore, RTCCvariable is set to avalue between 194 and 209 within thesetRTCC routine based on the state ofthe configuration jumpers X0-through-X3. These four bits give 16 differentRTCC preset values that modify the ba-sic system timing of the beacon, whichresults in an ability to more preciselyposition the base carriers within about +/- 60 Hz around their nominal values.

The last comment about the software de-sign is that I make extensive use of thelook-up table (LUT) capabilities of theSX microcontroller. Using the LUTs, weare able to easily generate two 64-pointsine waves — a positive-going oneSINETBP and a negative going one(SINETBN) – and a 64 point half cosinewaveform (COSTBL). Using a pointer totravel through each table allows easy re-trieval of the waveform values which rep-resent a 0-to-1 percentage of the 5 bitvalues represented in the tables.

BASIC ASSEMBLY

There’s really not too much to assem-bling this project – it’s really just a coupleof IC’s and a handful of resistors and ca-pacitors mounted on a printed circuit card.All you’ll need to do is to assemble thecircuits according to the Schematic andParts Layout diagrams, plug the chips intothe sockets, connect a DC power sourceand a speaker, and the Beacon shouldwork. No dreaded toroids to wind, noalignment … no muss, no fuss!

The top of the actual pc board is noted“Component Side”. Start by inserting theIC sockets into their respective holes.Carefully solder all pins in pace on thebottom side of the pcb.

Next solder the J2 DB-9 connector inplace.Be sure to solder the heavy tabsthat will protrude through the two largeholes in the pcb, as this will give the con-nector strength.

Next install the resistors. All resistorswill be mounted in the “upright” posi-tion, as noted in the sketch on the Layoutdiagram. Although there is no silkscreenon the pcb to denote precise location ofcomponents, carefully matching up thehole patters to the Layout diagram shouldallow an easy install of the resistors.

Install the 3-terminal voltage regulator,VR1. This component should bemnounted so it can be bent over parallelto the pcb and about 1/8” off the board.Although it will get a little warm duringoperation, no heatsink will be required.

Install all remaining components: ca-pacitors, the 3-terminal resonator Y1, andthe potentioment R4.

Carefully wire all off-board compo-nents to their respective pads, followingthe Layout diagram. This includes the

speaker, the START pushbutton, the J1battery clip,

Before inserting the IC’s to their sock-ets, apply power to the circuit and en-sure that the “O” (output) pin of VR1reads 5V DC.

Turn off power and insert the ICs totheir respective sockets. Ensure that pin1 of each IC corresponds to the Layoutdiagram.

With all off board components con-nected, you can apply DC power againand depress the START pushbutton (orplace the CONTINUOUS jumper inplace). You should hear a relatively loudPSK31 warble tone coming from thespeaker for the duration of the beacontransmission. Adjust R4 for an accept-able volume level.

The “acid test” of your success will beto power up a computer running DigiPanor other PSK31 program and present theBeacon audio as input to the computer.Many computers and most laptops havea built-in speaker that allow the tones tobe “heard” by the program. Your beacon’swarble should be visible on-or-around oneof the base frequencies on the waterfalldisplay: 500 Hz, 1 KHz or 2 KHz. Placethe cursor on that displayed signal andyou should see your Beacon’s pro-grammed sequence displayed in the textportion of the display. Experiment withthe jumpers to see and hear the flexibilityavailable in your Beacon’s frequency set-tings.

In Case of TroubleIf you had any problems in the Check-

out step, you should first re-check forproper voltages, proper IC orientationsin the sockets, and good solder joints.When the Beacon is running, the TestPoint will be a continuous 15 Hz squarewave (31ms high, 31ms low) that can beseen as a voltage bouncing around between

Page 7: PSK31 Audio Beacon Kit - njqrp.clubnjqrp.club/psk31beacon/manualv2.pdf · audio amp for use with a user-supplied speaker for use in group activities. ... 4 The NJQRP “PSK31 Audio

The NJQRP “PSK31 Audio Beacon Kit” 1312 The NJQRP “PSK31 Audio Beacon Kit”

2-to-3 volts on a DC voltmeter. If youhave an oscilloscope, you should see thePSK31 waveforms at the output of theDAC, as indicated on the schematic. Youwill also see a relatively constant 2.4Vreading at this same point when using aDC voltmeter. The PTT pad will be at 5Vduring transmission and at 0V when theBeacon is stopped. Current consumptionof the Beacon is nominally about 80ma.

Using the Serial COM Line forCustom Beacon String Entry

You can next check out the capabilityof entering a custom beacon string.

The serial channel is set for 19,200 bps,no parity, 8 bits of data, and 1 stop bit(“N-8-1”). Your external computer ter-minal should be set in this way also.

As described previously, put the X1jumper in place to signal Serial Mode.

Put the X7 (CONTINUOUS) jumperim place and hold down the STARTpushbutton while turning on the powerto the board.

The terminal program running on thecomputer will display a “:” (colon) char-acter to prompt you to begin string dataentry.

You may enter up to 64 characters fromthe keyboard, or you may terminate thestring with the ENTER key before 64characters have been entered.

The upon string entry completion, thesoftware will immmediately start trans-mitting the new beacon string (becausethe CONTINUOUS jumper is in place).You may remove that jumper and use theSTART puhsbutton to initiate anotherstring transmit.

You may also set or remove any jump-ers to shift the carrier frequency of theBeacon as previously described.

Don’t forget that the new beacon string

you entered is “volitile” and will be lostupon removal of board power. In thisevent, the Beacon will revert back to thepre-programmed string.

Using the Serial COM Line forCharacter-by-Character Trans-mission

Whenever the Beacon is quiet, it iswaiting for an event at the “top” of theprogram. Normal events are the STARTbutton being actuated or the CONTINU-OUS jumper X7 being put in place.

Another event that triggers transmis-sion is data coming over the RS232 serialCOM line. In this case the character re-ceived is immediately encoded and trans-mitted out to the speaker/MIC.

Buffering of characters is not accom-plished in the current version of Beaconsoftware - you must be careful to typeslowly so as to not send a keyboardcharaceter before the current character iscompletely transmitted. This 31 baud ratewill seem slow at first but one is quicklyable to adjust the typing speed. Futureversions of the Beacon software will pro-vide a buffering of input characters toenable “type-ahead”.

Again, as in the case of the CustomBeacon String Entry mode, you must en-sure that the computer terminal programis set for 19,200 bps, no parity, 8 bits ofdata, and 1 stop bit (“N-8-1”).

You must also ensure that the SerialMode jumper X1 is in place.

SummaryEven if you haven’t yet made the

plunge into on-the-air PSK31 operation,this project gets you in the air with audiowarbles that can be used for club fun aswell as for test and alignment purposeson the workbench.

Stay tuned for a single-chip demodu-lator design in progress to serve as a com

panion to this Beacon modulator chip,which will then serve as a complete mo-dem for a standalone PSK31 controller!

REFERENCES1. Scenix programming tools, manuals,parts and other technical information:

2. Parallax — http://www.parallaxinc.com … tools, evalboards, programmers, parts

3. Ubicom (formerly Scenix) – http://www.ubicom.con

4. SXTECH – http://www.sxtech.com

5. SX Forum – http://www.sx-forum.com

6. Beacon Kit online informationwebsite, containing source code, manualrevisions, kit notes, tips & techniques,

example photos, etc … http://www/njqrp.org/psk31beacon/psk31beacon.html

7. See the Official PSK31 website for arobust listing of PSK31-related articles,technology descriptions, etc. Locatedat http://www.psk31.html

Special thanks are due to our club techni-cal advisors Joe Everhart N2CX and DaveBenson NN1G, for their generous sup-port during the development of thisproject.

Copyright - The PSK31 Audio Beaconhardware and software was designed byGeorge Heron, N2APB. Copyright 2001,all rights reserved. Any portion of thehardware or software may be reproducedfor personal and non-profit use providedthis credit is included in derivative work.

Here’s one of the prototype PSK31 Beacon printed circuit boards in theprocess of being programmed with the “SX Key” cable connected to thedevelopment PC. Note the DB9 serial connector and MAX232 driver chip atthe left of the board providing serial communication with the PC duringBeacon use. An electrolytic is mounted in an unusual manner over theLM386 audio amp on the right - the final layout of the pcb provided in the kitbrings this cap down to the board.

Page 8: PSK31 Audio Beacon Kit - njqrp.clubnjqrp.club/psk31beacon/manualv2.pdf · audio amp for use with a user-supplied speaker for use in group activities. ... 4 The NJQRP “PSK31 Audio

The NJQRP “PSK31 Audio Beacon Kit” 1514 The NJQRP “PSK31 Audio Beacon Kit”

This is how the DigiPan screen looks when receiving an audio PSK31 Bea-con signal via the computer’s sound board (e.g., through the laptop’s built-in microphone). Note the characteristic dual-tone “railroad track” signalduring the leading zeros sent for synchronization, and its relatively cleanindication of -36 dB IMD. DigiPan displays the incoming PSK31 signal in thereceive window, showing the pre-programmed data string used in theauhor’s prototype.

This is a view of a typical “development environment”, simply consisting of anintegrated editor/assembler/programmer/debugger from Ubicom, the supplier ofthe SX chips. Once the program is entered or modified, the user selects the Runmenu option as shown which initiates the assembly operation. If there are noerrors in the program, an automatic chip programming sequence is initiated withthe target board through the SX Blast or SX Key cable, and the program is then runon the target. Overall time for this assemble/program/run operation is about 15seconds.

Page 9: PSK31 Audio Beacon Kit - njqrp.clubnjqrp.club/psk31beacon/manualv2.pdf · audio amp for use with a user-supplied speaker for use in group activities. ... 4 The NJQRP “PSK31 Audio

The NJQRP “PSK31 Audio Beacon Kit” 1716 The NJQRP “PSK31 Audio Beacon Kit”

APPENDIX BWarbler’s Guide to Considerate Beaconing

by Joe Everhart, N2CXOperating a beacon can truly be fun. Onecan determine antenna performance,propagation characteristics, effects of dif-ferent power levels, etc. However it’s notsomething done every day and many willnever use a beacon on the air. But if youdo couple your PSK31 Audio Beaconwith an SSB transmitter, here are someguidelines for considerate beacon usage.

Any use of a transmitter to radiate a sig-nal should be done with courtesy in mind.The electromagnetic spectrum is like realestate – it’s a limited resource that weshare with others. And the radio amateur

bands are like limited access parkland towhich we are granted access so long as weuse them properly. Other licensed hamswant to enjoy them too and we must keepthat in mind so that we don’t lessen theirpleasure by our use of the bands. Afterall, you wouldn’t play baseball in themiddle of a picnic ground and picnickersare unlikely to spread their lunch out on aball field!

As mentioned, beacons are not an every-day tool. When they are put on the airit’s for a specific purpose — often to gaugesignal propagation. This means that we

APPENDIX AProgramming the SX28 Microcontroller

Developing software programs for theUbicom/Scenix SX-xx series ofmicrocontrollers is a fun and relativelysimple process. The only tool needed iscalled the “SX Blitz Programmer”, whichis a small 1" x 1/2" board that fits on theend of a standard DB-9 serial cable com-ing from a PC. The other end of the SXBlitz plugs into the a 4-pin header on thetarget project board (i.e., our PSK31 Au-dio Beacon). The CD-ROM that comeswith the SX Blitz contains a combinededitor/Assembler/programmer applica-tion that is used to “burn” your customsoftware into the flash memory of theSX device.

To use this simple development environ-ment, just connect the serial cable and SXBlitz combo to your project board, andenter your assembly language source codeof your program (or load the suppliedsource code file audiopsk31v1.src” fromthe ARRL website). Then select the menuitem “Program” which assembles yoursource code file and programs the targetSX chip all in one quick operation. TheSX Blitz board sells for $79 from Paral-lax, and full details can be seen on theirSXTECH web page atwww.parallaxinc.com/html_files/sxtech/sxtech_home.htm. Other SX tools arealso available that provide valuable in-cir-cuit debugging capabilities (using the SX-Key) as well as demo and evaluationboards.

do want them to be heard by someone.

Beacons may simply be an unwelcomeintruder to others. Only shorts periodsof operation should be limited to onlythat short period of time when it will dosome good without being and annoyance.Similarly, it is extremely impolite to justplop it on the air willy-nilly and let ittransmit for extended periods when bandactivity is high. Its use to judge propaga-tion is questionable when a band is highlypopulated; simply “reading the mail” onexisting signals gives much the same in-formation.

Then, too, at least on the HF bands, run-ning a long duration beacon is not a legalactivity. Only on VHF and higher (in theUS) can one run a full-time beacon andthen only under certain conditions. Toremain legal one has to constantly moni-tor the operating frequency to ensure thatno interference is caused by the beaconand operation must cease if such interfer-ence is likely to occur. This means thatthere must be a full-time operator moni-toring the frequency for the duration ofbeacon operation. Continuous or unat-tended operation is clearly illegal and willlikely gain the FCC’s attention in addi-tion to arousing ire on the part of otherband occupants.

To ensure legality the beacon must use avalid callsign for operation and any trans-missions must take place on an appropri-

ate frequency for the class of theoperator’s license. Abuse of this will bevery evident to any government monitor-ing station or ARRL Official Observer.

Another important consideration in cou-pling this PSK31 Audio Beacon with anSSB transmitter is the audio drive levelfeeding the transmitter. The design of thisproject accommodated a high level audiopower amp in order to drive a speaker,however this speaker drive level is far inexcess of the proper drive level for a trans-mitter. You should at least use the directoutput of the R-2R DAC as the input tothe transmitter, and your will likely evenneed to pad it further with a potentiom-eter. The “splash” caused by overdrivingan SSB transmitter with these audio tonescauses severe side channel energy and in-terference to others near your frequency.Either use an oscilloscope (looking at theRF signal) to determine if you are overmodulating the transmitter, or get on-the-air reports from others while backing offthe drive level until an acceptable signal isbeing transmitted.

While you want your beacon to be re-ceivable, you really should not interferewith normal operations on a given fre-quency. It is in extremely band form (assome CW beacon operators have found)to run a beacon exactly on a frequencycommonly in use for other purposes. This

Page 10: PSK31 Audio Beacon Kit - njqrp.clubnjqrp.club/psk31beacon/manualv2.pdf · audio amp for use with a user-supplied speaker for use in group activities. ... 4 The NJQRP “PSK31 Audio

The NJQRP “PSK31 Audio Beacon Kit” 1918 The NJQRP “PSK31 Audio Beacon Kit”

mastered instruction set which has only33 commands. These devices are so pow-erful and flexible that they can be used toperform logic and control functions thatwould be literally impractical to do withdiscrete components and logic arrays. Atthe same time, the smaller parts can beeasily programmed to perform simplecontrol logic that can cost effectively re-place the same capability of a handful ofTTL or CMOS logic IC’s. The parts aremade with a modern CMOS semiconduc-tor process which provides the designerwith many choices of operating condi-tions. One being high speed operation,by using a fast clock oscillator for systemtiming, to obtain fast logic signal response,or conversely, very low power operation,by using a slow clock oscillator, wherethis option would offer a low current drain,and long battery life in portable applica-tions.

But now we come to some of the impor-tant differences between the MCUs ofMicrochip and Scenix. Most notably, the50-, 75- and even 100-MHz clock speedcapability of the Scenix SX far exceedsthat of the Microchip PIC, which willrun at most at 20 MHz. (The original“flash” memory version of the PIC, the16C84 and later revised into a 16F84, canonly be run as high as 10 MHz.) Newerversions of PICs, having larger flashmemory have become available, and theydo run up to 20 MHz, but both the origi-nal ‘C84 and ‘F84 versions are still verypopular.

Programming internal memory and load-ing program can be accomplished using aserial data loading mode supported by afew IC pins, so it is possible for bothmanufacturers to use a special in-circuitprogramming circuit design, allowing fastand easy program loading. The PIC pro-gram memory of these original parts is

EPROM technology and can only be pro-grammed once in the normal molded plas-tic package (called OTP, for one time pro-grammable). Development parts use aceramic package with quartz windows forerasing the program memory with UVlight energy. As each new version of thesoftware is written, it is assembled orcompiled and the written into the pro-gram memory to test and evaluate. Tochange it then, you must erase the oldcode from memory, by flooding the chipwith UV light energy for 20 to 30 min-utes, and then electrically writing in thenew program, referred to as “burning” theEPROM memory. This software devel-opment method has been used with smallmicro-controllers in embedded systemssince the early days of microprocessorsabout 30 years ago, and it is still face-tiously referenced as the “burn and learn”method.

Flash memory of today’s MCU’s hasbecome very useful in rapid developmentprojects where frequent software changesrequire lots of reprogramming. The flashparts allow very quick reprogramming,actually writing over the old program us-ing electrical signals, and then electricallyreprogramming the data into EPROMmemory. All of the Scenix parts are madewith easily reprogrammed flash memory,which is electrically erasable orrewriteable, for the program space as wellas turning on or off many other chip fea-tures such as the oscillator speed, codeprotection, brown out detection and otheritems. This is the same EEPROM or flashmemory technology available in the Mi-crochip ’84 and most later parts.

The Parallax company in Rocklin, Cali-fornia, developed an amazing productcalled the Basic Stamp using these earlyPIC MCUs as the control device. In factthey made a small single in-line (SIL) pc

Many people know of Microchip’sPIC16xx series of chips, but not as manyare aware of the heart of this project —the Scenix SX microcontroller (MCU).Very similar in internal construction, fea-tures and software instruction set, the“SX” offer tremendous speed improve-ments over the PIC – the SX is about 40times faster! Because of this speed ad-vantage, the SX is able accomplish realtime control and signal processing thatbegins rivaling the domain of DSP chips.

But first, since so many of us are familiarwith the PIC series of MCUs, let’s ap-proach the Scenix SX overview in the formof a comparison to the PIC.

Microchip has provided us with a vari-ety of very useful programmable MCUthat can be used to design or replace elec-tronic logic and other kinds of control cir-cuits. An MCU is an integrated control-ler plus memory and I/O peripherals. Formany applications in electronic logic andcontrols the computational requirementsare not extensive and the MCU, will dojust fine — this is where the small PICdevices really excel.

In fact the “PIC” name that Microchiphas given to their parts is an acronym forthe words Programmable Interface Con-troller, a suitable title if ever there wasone. These devices are small 8 bit self-contained microcomputers with CPU,program memory, data storage and Input/Output (I/O) functions built in. Therewere originally three levels of capability

APPENDIX CScenix SX Microcontroller – An OverviewA comparison of Microchip PIC to the Scenix SX microcontroller with

some historical detailsby Allan Owen, WA3OWT

and complexity in the line of parts fromMicrochip, beginning at the low end withthe 16 series, the intermediate 17 seriesand the high end 18 series. These deviceshad different internal control word lengthsand memory array sizes, but in general,the low end 16 series had smaller memoryavailable for both the control programROM (read only memory) and the inter-nal stored data RAM (random accessmemory).

A typical early low end device, such asthe popular 16C54 had, for example, anElectrically Programmable Read OnlyMemory (EPROM) size limit of 512words of 12 bits each. So the controlprogram would be limited to 512 words.The internal RAM for storing data waslimited to 25 bytes. The I/O port linesavailable to connect signals to the outsideworld, numbered 12 in total. The part wasmounted in an 18 pin Dual In-line Pack-age (DIP) or the smaller surface mountequivalent. Higher capacity parts withmore resources were offered in larger pack-ages, such as the 16C55 with 20 I/O linesin a 28 pin DIP. Also more program anddata memory is available in the 16C56and ’57, with 1K words of program space,25 bytes of data, and 2K words of pro-gram, 72 bytes of data, respectively.Larger memory arrays became availablein later series parts.

Even though memory resources are quitelimited, a lot of control can be done withthese small controllers using the easily

Page 11: PSK31 Audio Beacon Kit - njqrp.clubnjqrp.club/psk31beacon/manualv2.pdf · audio amp for use with a user-supplied speaker for use in group activities. ... 4 The NJQRP “PSK31 Audio

The NJQRP “PSK31 Audio Beacon Kit” 2120 The NJQRP “PSK31 Audio Beacon Kit”

Then a few years ago, we hear from Scenixin Santa Clara California. They announceavailability of a new MCU that is com-patible with the Microchip PIC but op-erates faster, at up to a 50 MHz clock,and even for a time, they advertised a 100MHz clock speed version of the part.This grabs the interest of circuit and em-bedded system designers and some pcboard designers quit and run off to Mexico.But Parallax likes it and uses it to increasethe performance of the Basic Stamp prod-ucts. The Scenix parts are so much fasterand care relatively compatible with theMicrochip PIC that Scenix and Parallaxare sued by Microchip for collusion andtheft of intellectual property. The suit hasbeen settled and Scenix was bought byUbicom, a company focusing on IC de-velopment for internet connectivity ofcomputer equipment and embedded sys-tems. Today the Scenix parts are doingwell in production, have had some up-grades, and are well supported in termstools needed to develop products. Paral-lax actually makes the “eval”, program-ming and demo boards for most Scenixcustomers. These are very inexpensiveand include good technical documentationfor the new user.

Similarities and DifferencesThe new Scenix micro-controllers are sig-nal-for-signal compatible with the origi-nal Microchip PIC MCUs. In some cases,the package is mechanically different, asshown on the data sheets. One packagedifference to watch out for is the use ofthe narrow “skinny dip” with 28 pinsarranged as a dual row of 14 pins spacedonly 0.300 inch apart instead of the morestandard 0.600 inch spacing. The use ofthis package type saves board space,material and cost, and has very little downside. Scenix also makes the MCUs in thestandard molded surface mount packages.Other than package type and dimensions,

there are almost no differences of signifi-cance between the two manufacturers’parts.

The software code is compatible too, asthe new Scenix parts will run the same opcodes and commands as the correspond-ing Microchip PIC. The same instructionexecution speed is available up to 20 MHzclock, in “compatibility mode”. The SXparts will run at the much faster clockoscillator speeds too, or down to the lowspeed clock, in power saving mode. Inaddition to the fast clock, the SX can runin Turbo mode, where most op codes ex-ecute in one instruction time cycle, speed-ing up program execution considerablyfrom the same code running in a PIC atthe same clock speed, where most instruc-tions take 3 clock cycles. The internalmemory space is the same for both parts,with the same size program and datamemory arrays being used. There are somedifferences however, mostly to the good.The program memory is all electricallyeraseable or flash type, and can be repro-grammed with software changes or up-dates, up to thousands of times. Soft-ware design, testing and revision effortsare improved in the Scenix parts, due tosome built-in debugging hardware placedinside the IC, and this works well withsimple and inexpensive external hardwareand software debugging tools provided forcustom development by the designer.

The in-circuit programming (ISP) featureis accomplished more simply with theScenix parts than with the PIC, and thetwo programming methods are not com-patible. They are both highly effective inbeing able to make ISP changes after themicro-controller IC is mounted onto thepc board. With most PIC processors,you can add a 5 pin header to bring sig-nals out directly from the board to theprogramming device. These include

board with voltage regulator, micro-con-troller with clock oscillator, memory andI/O lines. This self-contained board hadeverything built and ready to use and at avery attractive price of around $30. Itoperated from a 9 volt transistor radiobattery for hours. You could communi-cate directly with it by using a specialcable connected to your PC and it wasprogrammed to respond to a specializedand limited version of Basic. This popu-lar and easy to use, high level languagewas stored in a separate non-volatilememory IC, outside the micro-controlleron the Basic Stamp. The very successfulStamp product is still in production andhas seen many improvements including abig brother version providing more func-tions, and features such as more I/O linesand memory for the stored program. Dur-ing the development of these products,Parallax apparently got technical infor-mation and architectural details from Mi-crochip about the internal features of theMCU, a factor which undoubtedly helpedthem develop better products, but alsocame back to haunt them in the future.

Computer Science teaches that there aretwo fundamental architectures used inearly computers and likewise in many ourmicroprocessors and MCUs today. Thefirst type is the Harvard architecture whichuses at least two separate memory arraysfor storing the control program informa-tion and the internal data that is beingprocessed. This has a potential speedadvantage when the memory can be madefrom fast RAM and ROM, and also if theinstruction set that must be decoded fromthe program memory by the processorcan be reduced in complexity. This is calleda RISC processor for reduced instructionset computer, and most DSP chips beingused today owe their performance to fac-tors such as those described here. Thesecond type of popular computer archi-

tecture is Von Neuman which has onecombined memory that freely mixes theprogram commands with the data. In facteverything looks like one big memory ar-ray. This computer architecture may ap-pear to be simpler than Harvard type,because the CPU treats everything includ-ing I/O in the same way, just like memory,and in fact most mainframes and mini-computers are structured this way, withclaims that cost reduction is afforded bythis approach. The penalty of course, isthat the CPU needs to unscramble thecode from the data. So it must do somede-multiplexing while performing thosesequential op code fetches. For this rea-son, the computer probably cannot runas fast in this form and commands are notoften simplified, since the system mustbe able to do many kinds of data manipu-lation directly into and out of memoryand so you now have the complex instruc-tion set computer (CISC type).

The microchip PIC controllers are RISCtype and all of have Harvard type archi-tecture, with separate internal programand data memory. These are in fact ofdifferent bit lengths or widths, as the datamemory is 8 bits wide and the programmemory is 12 bits wide in the 16C seriesof parts. As far as the performance of thePIC micro-controllers is concerned, theearly parts could operate with up to 20MHz clock oscillator, by using either anexternal crystal or ceramic resonators. Theprocessor internal hardware uses a fourphase clocking scheme, and the result isthat using the maximum external clockspeed of 20 MHz, for example, the inter-nal processor clock is running at one fourththis rate, or 5 MHz. The micro-controllerwould execute most of the program com-mand instructions in one or two instruc-tion cycles, so the parts had fairly highperformance rating of several MIPS, ormachine instructions per second.

Page 12: PSK31 Audio Beacon Kit - njqrp.clubnjqrp.club/psk31beacon/manualv2.pdf · audio amp for use with a user-supplied speaker for use in group activities. ... 4 The NJQRP “PSK31 Audio

The NJQRP “PSK31 Audio Beacon Kit” 2322 The NJQRP “PSK31 Audio Beacon Kit”

ground, 5Vdc, MCLR* (master reset line)and two I/O port lines, RB6 and RB7. A5 wire cable can connect your board to anexternal programming device. With theScenix part, adding ISP is also easy to do.Similar to the PIC, you can add a 4 pinheader to bring out the signal lines neededto program the parts. These includeground, 5Vdc, and both oscillator pins(Osc1 and Osc2). The external program-ming device operates through these lines,and again by using a special cable to anexternal program device, you can changeyour control program easily after theequipment is built.

Some specific differences between the PICMCUs and the Scenix SX28 include sev-eral new programmable features in theSX28. For example, the clock oscillatorhas a programmable gain to help use thedevice with a wide range of external reso-nators and crystals. Also, internal circuitsto provide the I/O port lines with certainelectrical attributes, such as triggering in-terrupts on change of state, pull up resis-tors and Schmitt inputs to give clean logi-cal signal response to analog inputs areoffered. Other hardware differences in-clude the option to use a deeper 8 levelstack instead of the two level stack avail-able in the PIC. In software, significantdifferences exist with the Scenix parts thatallow certain software changes to give highperformance capabilities in the programthat cannot be done easily with a PIC.Ten additional instructions are availablein the Scenix parts, allowing easy bankand memory page switching, and inter-rupts with context save/restore, makingpossible faster data table look-ups withless code, and direct control code accesswhich has advantages in fail safe softwarechecking and a few other applications.

Today the Scenix family of micro-con-trollers includes several replacements for

the smaller 18/20 and 28 pin Microchipparts. These offer much faster executiontimes and they are not much more in cost.Both Microchip and Scenix have newhigher capacity MCUs with largermemory, more internal features and ex-ternal I/O pins. These of course, requirelarger packages offering 40, and 48/52 pins.These new parts and the tools needed touse them are available from Microchipand their authorized electronic distribu-tors. Scenix also provides support tools,development boards and kits, from dis-tributors and the Parallax Company. Forexample, a complete development includ-ing a sample MCU from Scenix is onlyaround $149. A programming and de-bug-ging tool is $99 and just a programmingtool is available for $79 or less.

Both companies a free and highly inte-grated development software for PIC de-signers. The Microchip version, calledMPLAB, includes an integrated assem-bler, linker and loader for the program-ming device. Scenix takes the same ap-proach to helping the designer to use theseparts. Scenix provides development soft-ware that includes an assembler, loaderand programming tools that work wellwith inexpensive external hardware forprogramming and debugging all of the mi-cro-controllers in the family.

Visit www.scenix.com, o rwww.ubicon.com for engineering appli-cation notes, data sheets and code listingsfor popular functions of the Scenix MCUsused by other developers. And make sureto check out the tools, development kits,educational boards and devices atwww.parallaxinc.com. Other technicalsupport and information can be found atwww.sxtech.com and www.SX-forum.com .

Page 13: PSK31 Audio Beacon Kit - njqrp.clubnjqrp.club/psk31beacon/manualv2.pdf · audio amp for use with a user-supplied speaker for use in group activities. ... 4 The NJQRP “PSK31 Audio

The NJQRP “PSK31 Audio Beacon Kit” 2524 The NJQRP “PSK31 Audio Beacon Kit”