Motorola CMD11E1 User Manual

CMD11E1
Development Board for the Motorola 68HC11E1
xiom
anufacturing
2000 717 Lingco Dr., Suite 209 Richardson, TX 75081 • (972) 994-9676 FAX (972) 994-9170
email: Gary@axman.com web: http://www.axman.com
CONTENTSCONTENTS
Installing the Software.....................................................................3
Board Startup..................................................................................3
Support Software ............................................................................4
Software Development....................................................................4
Creating source code......................................................................4
Assembling source code.................................................................5
Running your application ................................................................6
Programming External EEPROM....................................................7
ADDRESS DECODING...................................................................8
MEMORY MAP................................................................................9
MODE Select Jumpers – JP1 and JP2..........................................10
Buffalo Trace Jumper – JP13........................................................10
Memory Selection Jumpers JP3 – JP10........................................11
LCD_PORT...................................................................................12
KEYPAD........................................................................................12
SERIAL PORTS............................................................................13
COM2 Option Jumpers ...........................................................13
422/485 OUT.......................................................................... 13
SS: KEBOARD .......................................................................14
PARALLEL PORTS.......................................................................14
AUX_PORT...................................................................................15
MCU_PORT..................................................................................15
BUS_PORT...................................................................................16
TABLE 1. LCD Command Codes.................................................19
TABLE 2. LCD Character Codes..................................................19
TABLE 3. Buffalo Monitor Commands..........................................20
2
GETTING STARTED
The Axiom CMD11E1 single board computer is a fully assembled, fully functional development system for the Motorola 68HC11E1 microcontroller, complete with wall plug power supply and serial cable. Support software for this development board is provided for Windows 95 and NT operating systems.
Follow the steps in this section to get started quickly and verify everything is working correctly.
Installing the Software
1. Insert the Axiom 68HC11 support CD in your PC. If the setup program does not start, run the file called "SETUP.EXE" on the CD.
2. Follow the instructions on screen to install the AxIDE software onto your hard drive.
3. After installation completes, double-click the AxIDE icon to start the utility program.
4. Select the PC serial port you're using to connect to the board. Click [OK].
5. Select your development board "CMD11E1" from the drop-down menu bar just below the main menu.
Board Startup
Follow these steps to connect and power on the board. This assumes you're using the provided AxIDE terminal (installed in the previous section) or a similar communications terminal program on your PC, and that all jumpers are in their default (from the manufacturer) positions. If you're using a different terminal program than the one provided, set it's parameters to 9600 baud, N,8,1.
1. Connect one end of the supplied 9-pin serial cable to a free COM port on your PC. Connect the other end of the cable to the COM1 port on the CMD11E1 board.
2. Apply power to the board by plugging in the wall plug power adapter that came with the system.
3. If everything is working properly, you should see a Buffalo Monitor prompt similar to that below in the Terminal window. Press the ENTER key and you should see a prompt which is the > character.
BUFFALO 3.4AX – Axiom Version of the Motorola Monitor / Debugger >_
4. Your board is now ready to use!
3
If you do not see the buffalo message prompt like that above, or if the text is garbage, see the TROUBLESHOOTING section at the end of this manual.
Support Software
There are many useful programs and documents on the included HC11 support CD that can make developing projects on the CMD11E1 easier. You should browse the CD and copy anything you want to your hard drive. See the README.TXT file for a description of what is included.
The main programming interface to the CMD11E1 board is the AxIDE program for 32-bit Windows. This program communicates with the board via its COM1 port and includes a Terminal window for interfacing with other programs running on the CMD11E1, such as the Buffalo Monitor or the Basic11 interpreter. It is also useful for displaying information from your own programs that send output to the serial port.
In addition to the terminal interface, this program also provide an easy to use memory programming and micro configuration interface to the board. Also on the disk is a free Assembler, example source code, and other tools to get you started.
Software Development
Software development on the CMD11E1 can be performed using the Buffalo Monitor utility programmed in U7 EEPROM to test and debug your program stored in RAM on U5. During this debug phase your program should be located just above the internal register block, for example $2000 (see the Memory Map section for details).
After satisfactory operation your program can be relocated to start at address $E000 then written to the EEPROM in U7 using the provided utility called AxIDE. After setting the appropriate jumpers your program will start automatically when the board is powered on.
TUTORIAL
This section was written to help you get started with the specifics of the CMD11E1 software development process. Be sure to read the rest of this manual as well as the documentation on the disk if you need further information.
The following sections take you through the complete development cycle of a simple "hello world" program, which sends the string "Hello World" to the serial port.
Creating source code
You can write source code for the CMD11E1 board using any language that compiles to Motorola 68HC11 instructions. Included on the software disk is a free Assembler and also a freeware C compiler and Basic compiler.
4
You should write your source code using a standard ASCII text editor. Many powerful code editors are available or you can use the free EDIT or NOTEPAD programs that come with your computer. Once your source code is written and saved to a file, you can assemble or compile it to a Motorola S-Record (hex) format. This type of output file usually has a .MOT, .HEX or .S19 file extension and is in a format that can be read by the programming utilities to be programmed into the CMD11E1 board.
It's important to understand your development board's use of Memory and Addressing when writing source code so you can locate your code at valid addresses. For example, when in "debug" mode, you should put your program CODE in External RAM. In assembly language, you do this with ORG statements in your source code. Any lines following an ORG statement will begin at that ORG location, which is the first number following the word ORG, for example: ORG $2000.
You must start your DATA (or variables) in a RAM location unused by your program, for example: ORG $1040. When finished debugging, you must change these ORG statements so that your program is moved to a valid EEPROM area - somewhere after hex E000 (or 8000 on a 32k board). Do this by putting an ORG $E000 in front of your Program CODE. Data may remain where it is or be moved down to internal RAM starting at ORG $0000. You must also program the STACK register somewhere at the top of your available RAM, for example hex 1FF. Do this with this instruction as the first instruction in your program code: LDS #$01FF.
A look at the example programs on the disk can make all of this clearer. If you're using a Compiler instead of an assembler, consult the compiler documentation for methods used to locate your code and data.
Source code created to run under the buffalo monitor environment will be slightly different than code written for stand-alone operation. The buffalo monitor contains interrupt and RESET vectors that your code must provide when it's no longer running under the monitor. See the Programming External EEPROM section for more information on this.
Assembling source code
An example program called “HELLO.ASM” is provided under the \EXAMPLE directory. You can assemble your source code using command line tools under a DOS prompt by typing:
AS11 HELLO.ASM –l cre s >HELLO.LST
Most compilers and assemblers allow many command line options so using a MAKE utility or batch file is recommended if you use this method.
The AxIDE utility software provided with this board contains a simple interface to the free assembler. Use it by selecting "Build" from the menu. This will prompt you for the file to be assembled.
DO NOT use long path names (> 8 characters). The free assembler is an old DOS tool that does not recognize them.
5
If there are no errors in your source code, 2 output files will be created:
HELLO.S19 a Motorola S-Record file that can be programmed into memory HELLO.LST a common listing file which shows the relationship between source
and output
The listing file is especially helpful to look at when debugging your program. If your program has errors, they will be displayed and no output will be generated, otherwise the listing file will be displayed.
Running your application
After creating an S-Record file you can "upload" it to the development board for a test run. The provided example “HELLO.ASM” was created to run from RAM so you can use the Buffalo Monitor to test it without programming it into EEPROM.
If you haven’t done so already, verify that the CMD11E1 board is connected and operating properly by following the steps under “GETTING STARTED” until you see the buffalo prompt, then follow these steps to run your program:
1. Press and release the RESET button on the CMD11E1 board. You should see the Buffalo
Monitor message. Hit the return key to get the monitor prompt.
2. Type LOAD T ↵↵
This will prepare buffalo to receive a program.
3. Select Upload and when prompted for a file name select your assembled program file in s-
record format that was created in the previous section called: HELLO.S19 Your program will be sent to the board thru the serial port.
4. When finished loading you will see the > prompt again.
Type CALL 2400 ↵↵ This tells buffalo to execute the subroutine at address $2400, which is the start of our test program.
5. If everything is working properly you should see the message “Hello World” echoed back to
your terminal screen then, since we return at then end of our program, a line containing the internal register status displayed by buffalo and the buffalo prompt.
6. If you do not get this message, try going thru this tutorial once more, then if still no go, see the
TROUBLESHOOTING section in this manual
You can modify the hello program to display other strings or do anything you want. The procedures for assembling your code, uploading it to the board and executing it remain the same. Buffalo has many powerful features such as breakpoints, assembly/disassembly, memory dump and modify and program trace. Type HELP at the buffalo prompt for a listing of commands or consult the buffalo documentation file for more information.
6
Loading...
+ 14 hidden pages