Let's write a program.
It was about time you would say. But before we begin you have to download a few important tools.
For all of you folks who love writing in assembly, I have to disappoint you, that I'm a C guy myself. While not nearly that efficient it is much simpler to master and hey you don't have to learn whole new world for every new CPU out there. That is not to say you don't need assembly at all. I often disassemble the program I have just compiled just to make sure the generated code is what I'm looking for - this actually saved me a couple of times, where due to some misunderstanding between the compiler and me the code was completely useless.
I would not recommend writing in high level language unless there is a free compiler available. Behold and download the GCC for 68HC11. I would recommend installing the pre compiled binaries. I also use cygwin, because it provides neat Unix style tools for mere mortal Windows users. Another thing you will need is the GEL library. I'm not quite sure what the library provides, but it has the include files which are required to build the samples.
You will also need the PICOBUG debugger. This program allows you to download code to your 68HC11.
So assuming you have:
On the GCC port for HC11 web sit you will find this simple example called blink.c. It was originally designed to command a Christmas tree blinking lights. Here is my simplified version of the example and you can download the modified source from this link.
What my modified source does is to create a pulse on Port A pin 6. with approximately 1kHz frequency.
We will discuss this simple program in great details here.
Here we will discus the steps you need to complete to run this program.