PSK31 Audio Beacon     

PSK31 Beacon


Project Description


App #1: Tone Gen

Description

Source Code


PSK31 Beacon

Description

Schematic

PCB Layout

Source Code


Programming the SX

Useful SX Links

SX28 Overview

Beaconing Guide


Back to 
Digital Homebrewing Home Page


PROGRAMMING THE SX28 MICROCONTROLLER

Developing assembly language programs for the SX is a fun and relatively simple process. A combined editor, assembler and programmer software application called SXkey.exe is available for free that allows you to compose your program and then “burn” it into the flash memory of the SX device. See the References section for the location of this free development software.

When you run the SXkey program, it displays a standard editor window within which you can load an existing program file from an app note, for example, or enter a new program from scratch. We’ll do the latter in creating our “tone generator” example program in just a bit.

Once your program is entered, you can select the Assemble menu item (under the Run menu bar item) to command a check of your program. Any errors will be noted and you’ll need to correct them all in order to proceed on to the next step.

Programming the SX chip

When you have an error-free assembly of your program, as noted in the status bar at the bottom of the SXkey window, you’ll be ready to connect the PC to your target SX board (i.e., the Beacon).

You’ll need a tool called the “SX Blitz Programmer”, which is a small 1" x 1/2" board that fits on the end of a standard DB-9 serial cable coming from a PC. The other end of the SX Blitz plugs into a 4-pin connector on the PSK31 Audio Beacon board.

A more capable device called the SX Key is also available. Like the Blitz, it’s able to do the download and programming of the SX flash memory, but the SX Key also provides an ability to debug your programs on the fly by displaying register and memory contents, single step controls and breakpoints.

After connecting either the Blitz or the SX Key, you’ll need to remove a little jumper on the Beacon board, X8, to allow the Blitz to supply the clock to the SX chip.

Now you’re all set to send your new program down to the Beacon board and burn it into the flash memory of the SX chip.  Select the Run menu bar item again, and then the Run sub-menu. A small window will appear showing a progress bar as the programming proceeds. In a few moments the process will be done and your program will be running on the board!

If you have the SX Key programmer (as opposed to the Blitz programmer), you can  use the Debug menu item instead of Run. This will load and burn your program in the same manner as above, but will also bring up a debug screen showing all memory, registers and source code listings within which you can set breakpoints. You’ll need to read the manual for details on using the debugger, but it’s intuitive and powerful … and pretty essential when developing even moderately sized programs.

The Development Environment

Shown below is a view of a typical "development environment", simply consisting of an integrated editor/assembler/programmer/debugger from Ubicom, the supplier of the SX chips. Once the program is entered or modified, the user selects the Run menu option as shown which initiates the assembly operation. If there are no errors in the program, an automatic chip programming sequence is initiated with the target board through the SX Blast or SX Key cable, and the program is then run on the target. Overall time for this assemble/program/run operation is about 15 seconds.

 

Programming the SX28 Device

In the photo below you can see the SX-Key programmer plugged into the 4-pin header at the top edge of the Beacon pcb. This programmer cable, purchaced from Parallax.com for about $129, plugs into a standard DB-9 serial port on your PC and interacts with the free development software (editor, debugger, etc, as described above).  This is called "in circuit programming", and it couldn't get too much easier!

 

 


Page last modified: November 28, 2001

Copyright 2001 G. Heron, N2APB

n2apb@amsat.org