home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of A1200
/
World_Of_A1200.iso
/
programs
/
develop
/
hc11dev
/
talkers
/
talkerf1.hlp
< prev
next >
Wrap
Text File
|
1995-02-27
|
8KB
|
136 lines
************************************************************************
* TALKERF1.HLP *
* This file gives information on how to use PCBUG11 with Motorola's *
* 68HC11F1 MCU. The basic method of setting up the system, and a *
* description of how to install the macro utilities F1UTILS is given. *
* Some common problems are also discussed. These relate to the PC's *
* serial port and the restriction on the different operating modes of *
* the 68HC11F1 MCU. A summary of the way to use PCBUG11 to program *
* the CONFIG register is given near the end of this file. *
************************************************************************
1. Installing PCBUG11.
----------------------
Copy all the files off the supplied floppy disc in to a sub-directory - a
suitable name for the sub-directory might be PCBUG11.
Add the path name of the sub-directory to the MSDOS path list, using the PATH
command. (Your AUTOEXEC file may already contain the path command, which you
should modify.)
Using a suitable cable, connect the PC's COM1 serial port to the 68HC11F1's
SCI TX and RX pins through a level shifter, such as the MAX232 IC.
The supplied board has a MAX232 fitted.
IMPORTANT NOTE
--------------
The PC's COM1 signals CTS,DSR,DCD and DTR must all be shorted
together. On a 25 pin serial connector, these are pins 5,6,8 and 20,
and on a 9 pin serial connector these are pins 8,6,1 and 4.
The RTS line (pin 4) must be left unconnected at all points.
On the 25 pin connector this is pin 4, and on the 9 pin connector,
it is pin 7.
A common fault is caused by the TX and RX lines being the wrong
way round. Make sure that all the above points are checked.
Also, ensure the 68HC11F1 MCU is in BOOTSTRAP mode, and driven from
an 8MHz crystal. The MCU's XIRQ pin must be wired to the SCI RX line,
and a pull-up resistor may have to be added between the pins and Vdd.
(The MAX232 has an internal pull-up)
Failure to carry out the above instructions will almost certainly
result in a 'Talker communication failure' message if PCBUG11 is run,
or a complete hang up after the 'Downloading Talker code' is displayed.
2. Running PCBUG11
------------------
Once the serial lines have been connected, from the MSDOS command line,
type in: PCBUG11 BOOTF1 F1UTILS
This will start up PCBUG11, which will then download the code TALKERF1.BOO
to the MCU's internal RAM, between addresses 0 and $FF. The download is
performed at 7680 baud, by directly accessing the COM1 hardware.
If your PC is not IBM compatible at the hardware level, then the download
should default to 1200 baud.
Then the macro library, F1UTILS will be automatically loaded.
The source code for TALKERF1.BOO is given in the file TALKERF1.ASC - it has
been supplied for your reference only.
The macro library F1UTILS actually consists of 2 disc files:F1UTILS.DEF and
F1UTILS.NAM - refer to the DEFM.HLP,LOADM.HLP and SAVEM.HLP files for more
detail on these.
Once the download is complete, the most reliable method of determining if
PCBUG11 is connected properly, is to examine the value of the stack pointer
(SP) displayed on the screen. Its value should be $1FF. If so, you should be
able to perform basic memory display and modify operations, including
programming EEPROM and the CONFIG register. The main command line for PCBUG11
is at the bottom of the screen.
IMPORTANT NOTE
--------------
Because the MCU is running in bootstrap mode, most bits of the CONFIG
register appear to be fixed to '1'. This is caused by the fact that certain
defaults take precedence over the actual programmed value in the CONFIG
EEPROM bits - however, these bits can be programmed in the normal manner -
it's just that the programmed values cannot be read back in this mode.
The exception is bit 1 - it is permanently set to '1'.
3. Programming the CONFIG register
----------------------------------
To program the CONFIG register to $0D, from PCBUG11, type in: CONFIG 0D
Note 1: This will only work if the F1UTILS file has been loaded, otherwise
a command error will be displayed at the bottom of the screen.
With the supplied 68HC11F1 board, it is possible to partially check that
the CONFIG register has been properly programmed - this involves switching
the MCU into special test mode, without disconnecting the power supply.
To do this first remove link LK1 (MODA). Then press the reset button.
Now type in the PCBUG11 command: CONFIG?
This should display the exact value of the CONFIG register, with the exception
that the EEON bit will be clear.
*****************************************************************************
* To summarise: *
* ~~~~~~~~~~~~~ *
* a) Make sure the serial connections are correct, and the MCU is powered *
* up, and reset in Bootstrap mode. *
* *
* b) From MSDOS, type in: PCBUG11 BOOTF1 F1UTILS *
* *
* c) Once PCBUG11 starts, from its command line type in: CONFIG 0D *
* *
* ------------------------------------------------------------------------- *
* If you wish to partially confirm the value in the CONFIG register, now *
* execute instructions g) to i), otherwise execute d) to f) *
* ------------------------------------------------------------------------- *
* *
* d) The MCU can now be powered down and another one installed. *
* *
* e) Power up and reset the new MCU in Bootstrap mode, and then type in *
* the PCBUG11 command: RESTART *
* *
* f) Then proceed to c) above. *
* *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
* g) Without powering off the MCU, remove link LK1 (MODA) from the board *
* and press the RESET button. *
* *
* h) Enter the PCBUG11 command: CONFIG? *
* *
* i) Check the value displayed on the screen *
* *
*****************************************************************************
4. Autostarting PCBUG11 commands
--------------------------------
The whole process of starting PCBUG11, programming the CONFIG register, then
quitting PCBUG11 can be handled automatically by a command macro with the
name AUTOSTART. An example library containing the AUTOSTART macro is supplied.
It will automatically program the CONFIG register to $0D, and then return to
MSDOS. This means the programming operation can be performed by an MSDOS batch
file.
To run PCBUG11 in this mode, simply type in, from MSDOS: PCBUG11 BOOTF1 0D