![]() |
The information below is directly from the Motorola MCM6830L7 MIKBUG/MINIBUG ROM Engineering Note 100 that was Prepared by Mike Wiles (Computer Systems) and Andre Felix (Support Products Group). All of the images have been redrawn and embedded typos fixed. - K7MEM
The information in this Engineering Note has been carefully reviewed and is believed to be entirely reliable. However, no responsibility is assumed for inaccuracies. Furthermore, such information does not convey to the purchaser of the semiconductor devices described any license under the patent rights of Motorola Inc. or others. The material in this note is subject to change, and Motorola Inc., reserves the right to change specifications without notice. MIKBUG® and MINIBUG® are trademarks of Motorola Inc..
![]() |
The MIKBUG/MINIBUG ROM is an MCM6830 ROM of the MC6800 Family of parts. This ROM provides an asynchronous communications program, a loader prom, and a diagnostic program for use with the MEK6800 Microprocessing Unit.
![]() |
The MIKBUG/MINIBUG ROM provides the user with three separate firmware programs to interface with a serial asynchronous (start-stop) data communications device. They are:
- MIKBUG Rev. 9
- MINIBUG Rev. 4
- Test Pattern
![]() |
The more important features of these programs are:
MIKBUG Rev. 9 | MINIBUG Rev. 4 |
---|---|
Memory Loader | Memory Loader |
Memory Change | Memory Change |
Go to Target Program | Go to Target Program |
Print Registers of Target Program | Print Registers of Target Program |
Operates with PIA for the Parallel-to-Serial Interface | Assumes a UART for the Parallel-to-Serial Interface |
Print/Punch Dump | |
Restart/NMI/SWI Interrupt Vectors |
![]() |
![]() |
The MIKBUG/MINIBUG ROM is intended for use with the MC6800 Microprocessing Unit in an M6800 Microcomputer system. This ROM, using the MIKBUG Firmware, should be connected into the system as illustrated in Figure 3-1. As shown, all of the enable inputs are high levels and the address line A9 on pin 15 is grounded. The MIKBUG Firmware in this ROM uses addresses E000 through E1FF. The ROM should be connected into a system so that its two top MIKBUG Firmware addresses also will respond to addresses FFFE and FFFF. This is required for the system to restart properly. There should not be any devices in the system at a higher address Man this ROM's addresses. Figure 3-2 depicts a memory map for a system using the MIKBUG Firmware and Figure 3-3 depicts this system's block diagram.
The MIKBUG Firmware operates with an MC6820 Peripheral Interface Adapter (PIA) as shown in Figure 3-4. The MC14536 device is used as the interface timer. This timer's interval is set by adjusting the 50 KΩ resistor and monitoring the output signal on pin 13 of the MC14536 device. The zero level of the timing pulse should be 9.1 ms for 10 characters per second (CPS) operation and 3.3 ms for 30 CPS operation. Also, pin 16 (PB6) of the MC6820 PIA should be connected to +5 volts for 10 CPS operation and ground for 30 CPS operation.
The MC1488 and MC1489A devices provide the system with RS-232C interface capability. If the system is to interface only with an RS-232C terminal, no other interface circuitry is required; however, a jumper should be strapped between E3 and E4. The 4N33 optical isolators and associated circuitry are required to interface with a 20 mA current loop TTY. A jumper should be connected between E1 and E2 for TTY operation.
The MIKBUG Firmware also requires random access memory for a stack and temporary memory storage. The MCM6810 RAM used for this memory should be configured for the base memory address at A000 hexadecimal.
A reset switch is required in the system to provide for restarting the MC6800 MPU and for resetting the MC6820 PIA. The function may be provided by a pushbutton switch and a cross-coupled latch flip-flop.
![]() |
The MIKBUG/MINIBUG ROM is intended for use with the MC6800 Microprocessing Unit in an M6800 Microcomputer System. This system, using MINIBUG Firmware Rev. 4, should be set up with the starting ROM address at FE00 hexadecimal. The restart address generator (Figure 3-5) must be configured to respond with address FED6 each time the MPU requests the restart address. As shown, the system also requires an MCM6810 RAM for temporary storage. This RAM shall be configured for a FF00 base memory address. Figure 3-6 depicts a memory map for a system using the MINIBUG Rev. 4 Firmware.
The MINIBUG ROM Rev. 4 also uses a parallel-to-serial data converter to interface with an external terminal. The converter's status register must be located at address FCF4 and the data register at address FCF5. The least significant bit of the status register is used to indicate that the converter has received a character and the second bit indicates that the converter is ready for the next character to be transmitted.
![]() |
![]() |
The MIKBUG Firmware may be used to debug and evaluate a user's program. The MIKBUG Firmware enables the user to perform the following functions:
- Memory Loader Function
- Memory Examine and Change Function
- Print/Punch Memory Function
- Display Contents of MPU Registers Function
- Go to User's Program Function
- Interrupt Request Function
- Non Maskable Interrupt Function
The operating procedures for each of these routines as well as the Reset Function are discussed in the following paragraphs. The MIKBUG Firmware is inhibited from performing the user's program except in the Go to User's Program Function and the interrupt functions.
![]() |
Perform the RESET Function when power is first applied and any time the MIKBUG Firmware loses program control.
Press the RESET pushbutton switch. The MIKBUG Firmware should gain program control and the terminal should respond with a carriage return, a line feed and an asterisk. The MIKBUG control program is ready for an input.
![]() |
The Memory Loader Function of MIKBUG loads formatted binary object tapes or MIKBUG punched memory dump tapes into memory and if used, external memory modules. Figure 4-1 depicts the paper tape format. It is assumed at the start of this function that the MC6800 MPU is performing its MIKBUG control program and the last data printed by the terminal is an asterisk. Figure 4-2 illustrates a Typical Memory Loader Function.
- Load the tape into the terminal tape reader.
- Set the tape reader switch to AUTO.
- Enter the character L after the asterisk (*). This initiates the MIKBUG loading procedure.
The MIKBUG Firmware ignores all characters prior to the start-of-record on the tape.
NOTE
Tapes punched by MIKBUG do not have an end-of-file character at the end of the record; therefore, you must type in the characters S9 to exit from the memory loader function, or push the RESET pushbutton switch.
Checksum Error Detection
If, during the loading function, the MIKBUG Firmware detects a checksum error, it instructs the terminal to print a question mark and then stops the tape reader.
- If a checksum error is present, perform one of the following substeps:
- Press the RESET pushbutton switch and abort from the Memory Loader Function. The MPU will return to the MIKBUG control program and the terminal will print a carriage return, a line feed, and an asterisk.
- Reposition the tape and enter the character L. The record causing the checksum error is reread.
- Ignore the checksum error and enter the character L. The MIKBUG Firmware ignores the checksum error and continues the Memory Loader Function.
CAUTION
If a checksum error is in an address, and the continue option in substep 3 is selected, there is no certain way of determining where the data will be loaded into the memory.
![]() |
The MIKBUG Firmware performs this function in three steps:
- examining the contents of the selected memory location (opening the memory location);
- changing the contents of this location, if required;
- returning the contents to memory (closing the memory location).
It is assumed at the start of this function that the MPU is performing its MIKBUG control program and the last data printed by the terminal is an asterisk. Figure 4-3, above, depicts a typical Memory Examine and Change Function.
NOTE
If the memory address selected is in ROM, PROM, or protected RAM, the contents of this memory location cannot be changed and the terminal will print a question mark.
- Enter the character M after the asterisk to open a memory location. The terminal will insert a space after the M.
- Enter in 4-character hexadecimal format the memory address to be opened. The terminal will print on the next line the memory address being opened and the contents of this memory location. The contents are in hexadecimal.
- The operator must now decide whether to change the data at this memory location. If the data is to be changed, change the data in accordance with step d. If the data is not to be changed, the operator must decide whether to close this location and open the following memory location (step e) or to close this memory location and return to the MIKBUG control program (step f).
- If the contents of this memory location are to be changed, enter a space code and then the new data (in hexadecimal format) to be stored at this location. The new contents are stored in memory and the terminal prints the following memory address and its contents. Return to step c.
- To close the present memory and open the following memory location, enter any character except a space character after the displayed memory address contents. The contents are returned to memory and the terminal prints the following memory address and its contents. Return to step c.
- To close the present memory location and return to the MIKBUG control program, enter a space code followed by a carriage return control character. The contents are returned to memory and the terminal prints an asterisk on the next line.
![]() |
The Print/Punch Memory Function instructs the MIKBUG Firmware to punch an absolute formatted binary tape and to print the selected memory contents. The tape is formatted as shown in Figure 4-1 except that this tape does not contain an end-of-file control character.
The beginning address and the ending address must be entered into the memory. Memory addresses A002 and A003 are used to store the beginning address and addresses A004 and A005 are used to store the ending address.
It is assumed that the MPU is performing its MIKBUG control program and the last data printed by the terminal is an asterisk. Figure 4-4 illustrates a typical Print/Punch Memory Function.
NOTE
If you do not wish to punch a tape, turn off the terminal's tape reader.
- Enter the character M after the asterisk to open a memory location. The terminal will insert a space code after the M.
- Enter the address A002 after the space code. The terminal will print on the next line the memory address A002 and the contents of the address.
- Enter a space code and the two most significant hexadecimal bytes of the beginning address after the contents of address A002. These two bytes are stored in memory and the terminal prints address A003 and its contents on the next line.
- Enter a space code and the two least significant hexadecimal bytes of the beginning address after the contents of address A003. These two bytes are stored in memory and the terminal prints address A004 and its contents on the next line.
- Enter a space code and the two most significant hexadecimal bytes of the ending address after the contents of address A004. These two bytes are stored in memory and the terminal prints address A005 and its contents on the next line.
- Enter a space code and the two least significant hexadecimal bytes of the ending address after the contents of address A005. These two bytes are stored in memory and the terminal prints address A006 and its contents on the next line.
- Enter a space code and carriage return character after the contents of address A006. The control returns to MIKBUG control program and the terminal prints an asterisk.
- Enter the character P after the asterisk. The MIKBUG Firmware initiates the print/punch operation. At the conclusion of the print/punch operation the terminal prints an asterisk, and returns to the MIKBUG control program.
![]() |
The Display Contents of MPU Registers Function enables the MIKBUG Firmware to display the contents of the MC6800 Microprocessing Unit registers for examination and change. It is assumed at the start of this function that the MPU is performing its MIKBUG control program and the last data printed by the terminal is an asterisk. Figure 4-5 illustrates a typical Display Contents of MPU Registers Function.
- Enter the character R after the asterisk. The terminal will print the contents of the MPU registers in the following sequence: Condition Code Register, B Accumulator, A Accumulator, Index Register, Program Counter, and Stack Pointer. On the following line the terminal prints an asterisk.
- If the contents of any of the registers are to be changed, change the data in accordance with Paragraph 4.1.3. It should be noted that the address of the stack pointer is stored last, and it takes eight memory locations to store the contents of the MPU registers on the stack. Figure 4-5 illustrates changing the contents of the MPU registers and identifies the location of each register's data.
![]() |
This function enables the MPU to perform the user's program. It is assumed at the start of this function that the MPU is performing its MIKBUG control program and the data printed by the terminal is an asterisk.
Enter the character G after the asterisk. The MC6800 MPU System will perform the user's program until one of the following conditions occurs:
- The MPU encounters a WAI (WAIt) instruction. The MPU now waits for a non-maskable interrupt or an interrupt request.
- The MPU encounters a SWI (Software Interrupt) instruction. The MPU stores the data in the MPU registers on the stack and jumps to the MIKBUG control program. The terminal prints the contents of the MPU registers from the stack.
- The RESET pushbutton switch is actuated. This switch is to be actuated when the user's program blows and places the MPU under the MIKBUG control program.
![]() |
This function enables the user to evaluate a maskable interrupt routine. Steps a through e prepare the firmware to process an interrupt request and step f discusses performing the interrupt routine. It should be noted that this interrupt may be initiated at any time. It is assumed in preparing the MPU to process the interrupt request that the MPU is processing its MIKBUG control program and the last data printed by the terminal is an asterisk.
- Enter the character M after the asterisk. The terminal will insert a space code after the M.
- Enter the address A000. The terminal will print on the next line the memory address A000 and the contents of this memory location.
- Enter a space code and the two most significant hexadecimal bytes of the first interrupt routine's address after the contents of address A000. These two bytes are stored in memory and the terminal prints address A001 and its contents on the next line.
- Enter a space code and the two least significant hexadecimal bytes of the first interrupt routine's address after the contents of address A001. These two bytes are stored in memory and the terminal prints address A002 and its contents on the next line.
- Enter a space code and a carriage return character after address A002. The MPU jumps to its MIKBUG control program and the terminal prints an asterisk. The MPU now is enabled and ready to perform a maskable interrupt routine when the interrupt mask is cleared. This interrupt routine may be initiated at any time either through the PIA (if enabled) or the IRQ input to the MPU. Initiating an interrupt through the PIA is discussed in the MC6820 Peripheral Interface Adapter data sheet while initiating an interrupt through the IRQ input is discussed below.
- Ground IRQ input. If the interrupt mask is not set, the MPU will jump to the interrupt service routine indirectly through addresses A000 and A001. This is accomplished in MIKBUG by loading the index register with the contents of addresses A000 and A001 and then jumping to the address stored in the index register.
- Remove the ground from the IRQ input:
![]() |
This function enables the user to evaluate a non-maskable interrupt routine. Steps a through e prepare the MC6800 MPU System to process a NMI (Non-Maskable Interrupt) input and step f discusses performing the interrupt routine. It is assumed in preparing the MC6800 MPU System to process a non-maskable interrupt that the MC6800 MPU System is processing its MIKBUG control program and the last data printed by the data terminal is an asterisk.
- Enter the character M after the asterisk. The terminal will insert a space code after the M.
- Enter the address A006. The terminal will print on the next line the memory address A006 and the contents of this memory location.
- Enter a space code and the two most significant hexadecimal digits of the first interrupt routine's address after the contents of address A006. These two digits are stored in memory and the terminal prints address A007 and its contents on the next line.
- Enter a space code and the two least significant hexadecimal digits of the first interrupt routine's address after the contents of address A007. These two digits are stored in memory and the terminal prints address A008 and its contents on the next line.
- Enter a space code and a carriage return character after address A008. The MC6800 MPU System jumps to its MIKBUG control program and the terminal prints an asterisk.
The MC6800 MPU System now is enabled to perform a non-maskable interrupt routine. This non-maskable interrupt routine may be initiated at any time through the MC6800 MPU System NMI input.
- Ground the NMI input P1-E. If the non-maskable interrupt is not disabled (E3 to E4), the MPU will jump to the interrupt service routine indirectly through addresses A006 and A007. This is accomplished in MIKBUG by loading the index register with the contents of addresses A006 and A007 and then jumping to the address stored in the index register.
- Remove the ground from the NMI input P1-E.
![]() |
The MINIBUG Firmware enables the user's system using the MIKBUG/MINIBUG ROM to perform the following functions:
- Memory Loader Function
- Memory Examine and Change Function
- Display Contents of MPU Registers Function
- Go to User's Program Function
The operating procedures for each of these routines as well as the RESET Function are discussed in the following paragraphs.
![]() |
Perform the RESET Function when power is first applied and any time the MINIBUG Firmware loses program control. Press the RESET switch (or equivalent). The MINIBUG Firmware should respond with a carriage return and a line feed character. The MINIBUG program control now is ready for an input.
![]() |
The memory loader function of MINIBUG loads formatted binary object tapes into memory. Figure 4-1 depicts the paper tape format. It is assumed at the start of this function that the MC6800 MPU is performing its MINIBUG control program. Figure 4-6 illustrates a typical memory loader function.
- Load the tape into the tape reader.
- Set the tape reader switch to AUTO.
- Enter the character L. This initiates the MINIBUG loading procedure. The MINIBUG program ignores all characters prior to the start-of-record on the tape.
Checksum Error Detection
If during the loading function, the MINIBUG Firmware detects a checksum error, it instructs the terminal to print a question mark and stops while the MPU performs the MINIBUG control program. To load the tape, the user will have to repeat the memory loader function.
![]() |
The MINIBUG Firmware performs this function in three steps:
- examining the contents of the selected memory location (opening the memory location);
- changing the contents of this location, if required;
- returning the contents to memory (closing the memory location).
The Firmware, in examining a memory location, instructs the terminal to print the contents of this memory location in hexadecimal format. The MINIBUG Firmware in this function displays each of the program instructions in Machine language.
It is assumed at the start of this function that the MPU is performing its MINIBUG control program. Figure 4-7 depicts a typical Memory Examine and Change Function.
NOTE
If no memory, a ROM, or a PROM is located at the selected address, the contents of this memory address cannot be changed and the terminal will print a question mark.
- Enter the character M. The terminal will insert a space code after the M.
- Enter in 4-character hexadecimal the memory address to be opened. The terminal will print a space code and then the contents of this memory location. The contents are in hexadecimal.
- The operator must now decide whether to change the data at this memory location. If the data is to be changed, enter the two new hexadecimal characters to be stored in this location. The new contents are stored in memory and the MPU returns to the MINIBUG control program. If the data is not to be changed, enter a carriage return character; the previous contents are returned to memory and the MPU returns to the MINIBUG control program.
![]() |
The Display Contents of MPU Registers Function enables the MINIBUG Firmware to display the contents of the MC6800 Microprocessing Unit registers for examination and change. It is assumed at the start of this function that the MPU is performing the MINIBUG control program. Figure 4-8 illustrates a typical Display Contents of MPU Registers Function.
- Enter the character P. The terminal will print the contents of the MPU registers in the following sequence:
- Use the Memory Examine and Change Function in paragraph 4.2.3 to change the contents of a register.
![]() |
This function enables the MPU to perform the user's program. It is assumed at the start of this function that the MPU is performing its MINIBUG control program. Figure 4-9 illustrates a typical Go to User's Program Function.
Enter the character G. The MPU will load the MPU registers with the contents identified in Paragraph 4.2.4 and then start running the user's program at the address in the program counter (locations FF2E and FF2F). The program counter may be changed using the Memory Examine and Change Function in Paragraph 4.2.3.
![]() |
Options have been added to the original Motorola code to generate a S19 file and a Intel Hex file. These options are only included in the MC6800 SH/GAWK Cross Assembler. - MEM
![]() |
Options have been added to the original Motorola code to generate a S19 file and a Intel Hex file. These options are only included in the MC6800 SH/GAWK Cross Assembler. - MEM
![]() |