Appendix 1. Kevin Ross/Adapt812 Setup
What's in Appendix 1?
Kevin Ross's Background Debug Module
ICC12 options menu for developing software for the Adapt812
Adapt 812 Board Jumpers
What you need to get started
Development Procedure
Web sites for more information.
Kevin Ross's Background Debug Module/Adapt812
Technological Arts makes a variety of low cost 6812 products suitable for teaching laboratory classes. These boards are convenient because they can be inserted directly into a standard protoboard. See figures 1.28 and 1.47 in the book "Real time Embedded Systems" by Jonathan W. Valvano. Notice that the Technological Arts boards have a male connector that plugs into the student's female socket. If the students purchase their-own protobaord, then the mechanical "wear and tear" occurs on the inexpensive protoboard and not on the relatively-expensive microcomputer board. Technological Arts can be reached at
Technological Arts
819-B Yonge St.
Toronto, ON
M4W 2G9 Canada
toll-free: 1-877-963-8996 (USA & Canada)
Phone: (416) 963-8996 Fax: (416) 963-9179
http://www.technologicalarts.com
The Kevin Ross BDM-12 is a debugging interface between the PC and the Adapt812. It allows us to download programs, view/change registers, view/change memory, single step, and run software. If you have a logic analyzer for debugging, you can use the BDM-12 to modify the MC68HC812A4 mode so that the address and data bus are available on the Adapt812 H2 connector. With Windows 3.1, you will run Kevin Rosss DOS-level DOS12.EXE program. With Windows NT or 95, you will run Kevin Rosss DOS-level DB12.EXE program. For more information about the Kevin Ross BDM board contact, "Kevin Ross" kevinro@nwlink.com
Figure 1: The Kevin Ross BDM is used to program the Adapt812The proper DIP settings on the Kevin Ross BDM-12 board are
1 ON for 38400 bits/sec
2 OFF for debugger mode
3 OFF for 8 MHz 6812
4 OFF for 8 MHz 6812
The ribbon cable between the Kevin Ross BDM-12 and the Technological Arts Adapt812 should be attached so that Pin 1 is connected to Pin 1. It is possible to reverse the polarity so be careful. The Technological Arts APAPT812 settings:
Run/Boot switch should be in the Run position
MODA/MODB jumpers should both be in the 0 position for single chip mode.
The Adapt812 board can accept power from one of two sources. We will use an unregulated AC adapter (greater than 6 volts) connected to the power connector J1. The other option for the Adapt812 would be to connect a regulated +5v supply to the H1 connect. The BDM-12 helper board received its power from the Adapt812 through the BDM cable.
ICC12 options menu for developing software for the Adapt812
On the ICC12 development system, we use the options_compiler_linker menu command to specify where the start of globals (the data section grows towards higher addresses), and the start of the object code (the text section grows towards higher addresses). The initial stack pointer (stack grows towards lower addresses), is specified in options_compiler_linker menu. On our Adapt812 system,
the static variables (data section) should start at the start of RAM, 0x0800
the program (text section) should start at the start of EEPROM,
0xF000
the automatics (stack) could be set at the end of RAM, 0x0C00
the Library path is set to e:\mc6812\lib
the "Create Map File" button is selected
the "Heap size" is 0.
We use the options_compiler_compiler dialog to specify that C source code be added to the Asm Output on our Adapt812 system,
Figure 3: ICC12 compiler settings when using the Adapt812Check the "Emit Interspersed C Source in Asm Output" button.
We use the options_compiler_preprocessor dialog to specify that C++ comments can be used. On our Adapt812 system,
Figure 4: ICC12 preprocessor settings when using the Adapt812Check the "Accepts C++ Comments" button.
JB1 has two jumpers for MODA and MODB. They both should be in the 0 position. This will bring the MC68HC812 up in single chip mode, placing the 4K EEPROM from $F000 to $FFFF. There is a run/boot switch that should be in the "run" position. There is a boot loader in high EEPROM memory that can be used to program the Adapt812 from a serial port without the need for a Kevin Ross BDM. This procedure places the run/boot switch in the "boot" position.
Software
The most expensive piece of software you will need is a compiler. Information about ImageCraft ICC12 can be found from the web site http://www.imagecraft.com. The mailing address is ImageCraft, 706 Colorado Ave. Suite 10-88, Palo Alto, CA 94303. If a compiler is unavailable, you could use the TExaS simulator and develop 6812 programs in assembly. TExaS can generate S19 records for downloading. There is a free ICC11 C compiler on the TExaS CD.
Power Adapter
To run the Adapt812, you will need 5.5 to 9 VDC unregulated power source with a current of at least 100ma, plus the additional current your external circuits need.
Serial Cables
The cables between the PC and the development boards are standard 9 pin null modem serial cables.
Downloading Hardware
There are three ways to program the Adapt812. You can purchase
a Kevin Ross board (it does come in kit form). With this board
you download using the DOS-level application DL12.exe. Second,
you purchase a Freescale MC68HC912B32 EVB board and run it in BDM
POD mode. The ICC12 compiler supports this configuration. I.e.,
the PC connected to a 912EVB in POD mode, connected to the 812A4
target. Lastly, the Adapt812 board has a boot loader that can
accept S19 records directly from the PC. The disadvantages of
this method are there is no verify and no debugging support (but
it is cheap.)
The following steps are required for the project development:
1. Design the software
2. Design the hardware(if any)
3. Using ICC12, write(modify) the code
4. Remove compiler or assembly errors from the code, and also
any logical errors in the code which you think might be present,
print out the MAP file to assist in debugging
5. Build the hardware(if any) on your own protoboard
6. Eliminate as many hardware errors as possible before connecting
to the 68HC812.
7. With the power of the PC and BDM-12 off, connect a PC serial
port to the BDM-12 helper board
8. Using DL12.EXE, down load the object code of your software
into the 68HC812.
while running DL12 can observe memory
while stopped DL12 can observe/modify memory and registers
Web sites for more information
Technological Arts: | http://www.technologicalarts.com |
electronic parts at: | http://www.bgmicro.com |
robot parts at: | http://www.RobotStore.com |
ICC11/ICC12 at: | http://www.imagecraft.com |
Return to Table of Contents