|
HC05 Datasheet, PDF (27/232 Pages) Motorola, Inc – High-density complementary metal oxide semiconductor (HCMOS) microcontroller unit | |||
|
◁ |
Note: Oscillator divide-by-two is forced in bootstrap mode; all other mask options are selected
by the customer (see Section 1.2).
2
2.1.2.1 Serial RAM loader
In the âload program in RAM and executeâ routine, user programs are loaded into MCU RAM via
the SCI port and then executed. Data is loaded sequentially, starting at RAM location $0050, until
the last byte is loaded. The ï¬rst byte loaded is the count of the total number of bytes in the program
plus the count byte. After completion of RAM loading, control can be transferred either to the
second byte in RAM, $0051, by executing a jump to RAM + 1 function, or it can be transferred to
any address by executing a jump to any address function. During the ï¬rmware initialization stage,
the SCI is conï¬gured for the NRZ data format (idle line, start bit, eight data bits and stop bit). The
baud rate is 9600 with a 4 MHz crystal. A program to convert ASCII S-records to the format
required by the RAM loader is available from Motorola.
When the last byte is loaded, the ï¬rmware halts operation expecting additional data to arrive. At
this point, the reset switch is placed in the reset position which resets the MCU, but keeps the RAM
program intact. All routines loaded in RAM can now be entered from this state, including the one
which executes the program in RAM (see Section 2.1.2.2 and Section 2.1.2.3).
To load a program in the EEPROM, the âload program in RAM and executeâ function is also used.
In this instance the process involves two distinct steps. Firstly, the RAM is loaded with a program
which controls the loading of the EEPROM, and when the RAM contents are executed, the MCU
is instructed to load the EEPROM.
The erased state of the EEPROM is $FF.
Figure 2-3 shows the schematic diagram of the circuit required for the serial RAM loader.
2.1.2.2 Jump to RAM + 1
After the serial RAM loader program is completed this function can be used to execute a program
loaded in RAM starting at the second RAM address, $0051. It must be noted that the lowest RAM
address, $0050, is used by the RAM loader program to store the total number of bytes in the
program.
2.1.2.3 âJump to any addressâ
This function allows execution of programs previously loaded in RAM or EEPROM using the
methods outlined in Section 2.1.2.1.
To execute the âjump to any addressâ function, data input at port A has to be $CC and data input at
port B and port C should represent the MSB and LSB respectively, of the address to jump to for
execution of the user program. A schematic diagram of the circuit required is shown in Figure 2-2.
MC68HC05X16
Rev. 1
MODES OF OPERATION AND PIN DESCRIPTIONS
MOTOROLA
2-3
|
▷ |