Sooty Solutions - Burnaby BC Consulting Company - Advising Business Managers on Security, Information Technology, Business Process Performance, & Best Practices
Sooty HomeContractors are BetterThe Sooty ApproachLong Range PlanningThe Sooty PartnersContact Us
   

68HC11F1 Install - Hardware

Quick Links
 
  Background
  Microcontrollers
  Vacuum Pumps
  Vacuum Chambers
  Noble Gases
  Power Supplies
  Vacuum Gauges
  Plasma Tests
  Theory
  Simulators
 
 

Boot Process

The 68HC11F1 boot modes depend on the settings of {MODA, MODB}.

MODA     MODB     Boot Behaviour
High        High        Expanded
Low        High        Single Chip
High        Low        Special Test
Low        Low        Special Bootstrap

"Expanded" mode is the normal startup for a single board computer.
Port F is A0...A7,  Port B is A8...A15,  and Port C is Data0...Data7.
The default configuration expects 8KB of external RAM starting at $8000
and 8KB of external PROM starting at $C000.
We are not interested in this mode.

"Special Test" is some kind of mode used by Motorola during factory quality control. We are not interested in this mode.

"Single Chip" will be the permanent startup mode used when we are finished. The chip starts at first EEPROM location ($FE00) and that is where we will install our "Talker". This means a chip in a remote location (like inside a vacuum chamber) can be restarted into a known state with a power fail.

The "Talker" allows us to load programs into the 1024 byte RAM starting at $0000. These would be used for special tasks like turning on/off port bits and taking A/D measurements in a specific sequence. This would be much faster than reading and writing individual registers from the host PC via the RxTx (SCI). If the RAM program stalled or refused to relinquish control back to the talked the chip can be power fail restarted putting the EEPROM back in control.

The talker needs a little RAM to operate so we put its stack at the end of the RAM ($03FF). If the talker branches to the RAM based program it can safely use this area for storing data. When the RAM program finishes it would normally branch to $FFE0 so there is no conflict. Whatever is running assumes all of RAM if free for its use. If the RAM program needed to "return" to some specific state in the EEPROM talker then it must not alter the top 9 bytes of the stack where the return state is stored.

"Special Bootstrap" is the mode used to install the EEPROM talker. When started in this mode the chip maps a special ROM into visible memory. This ROM send out a "break" on the RxTx (SCI) looks for a "break" in return. If it sees one it goes through an autobaud sequence and sets the discovered baud rate. It then downloads a program into RAM and starts that program at $0000.

The downloaded program can be anything. In a teaching environment it is a class assignment to teach 68HC11 programming. If the 68HC11 is on a board with flash EPROM it is the program to load something as large as a Basic11 interpreter (8Kbytes) or a Buffalo monitor (8Kbytes). In an industrial or automative setting it is a firmware upgrade. In an interactive development environment (IDE) it is a "talker" designed to w ork with an IDE Client on a PC.

In our case it is the talker that comes with the JBug11 client.

Hardware Setup

The first piece of equipment you'll need is an old 32bit PC running any version of Windows. JBUG11 and most of the 68HC11 assembers and tools will not run on a 64 bit PC and you will need a PC with a real serial COM port. The installation of the talker requires that we can send and read a "break" character. USB to RxTx converters generally cannot issue or read a break character.

Once you have the talker loaded into the 68HC11 EEPROM you no longer need a "break" character and the Java program (below) work fine on a Window 7 x64 using a USB to RxTx. They will also work on a 32 bit PC so you can load and test on the old PC.

The next piece of equipment is a level converter that takes the 0V...5V signals off the RxTx ports and converts them to to the -9V...+9V RS232 signal levels. Note that you cannot just level-shift because the RS232 signals are inverted from their RxTx source. You can make you own using a MAX233 chip (needs no capacitors):
    

If your 68HC11F1 is on a board the RS232 may already be connected:     

Now you have to add a crystal and a few other jumpers then connect power, ground, MODA, MODB, Rx, and Tx:     

If your 68HC11F1 is in a socket on a board you just need to ground MODA (permanently) and put a shorting wire on MODB. When you are loading the talker into EEPROM twist the two wires together (A=B=gnd). In service A=gnd and B is floating:
    


If you managed to get the chip powered and connected to your old PC
(I always get Rx <--> Tx wrong ... its like plugging in a USB flash drive...always upside down the first attampt) you are now ready to load the talker into the EEPROM. Proceed to loading the talker.