Page 379 - Introduction to Microcontrollers Architecture, Programming, and Interfacing of The Motorola 68HC12
P. 379

356                                       Chapter 12 Other Microcontrollers

















                           Figure 12.5. The Register Set of the 6805

            Figure 12.4, the DOTPRD subroutine with stack parameters from Chapter 6, shows
        some similarity between the 6808 and the 6812. Differences, shown in bold type, are in
        allocating local variables and implementing 16-bit arithmetic.
            With these "patches," you can refer to the CPU08 Central Processor Unit Reference
        Manual to learn how to program it without much difficulty, although you might have a
        certain amount of frustration after being accustomed to the 681.2.



        12.3 The 6805

        The very inexpensive single-chip 6805 was designed for simple control applications that
        utilize bit manipulation and data structures but require simple instructions and only a few
        registers. Thus the 6805 has many addressing modes and bit manipulation instructions,
        even though it has few registers and few complex instructions.
            Figure 12.5 shows the 6805 register set. Compared to the 6808, the stack pointer
        and index register are only eight bits long. Figure 12.6 shows the 6805 condition code
        register. Compared to the 6808, there is no V bit to indicate a two's-complement
        overflow. Finally, Table 12.3 displays the 6805 addressing modes and instruction set.
        Compared to the 6808, the main difference is there are no push or pull instructions or
        stack index addressing. The 6805 stack is designed to hold only a subroutine return
        address and hold the machine state during an interrupt. There is no effective way to pass
        parameters on the stack or allocate and access local variables on the stack. Also, because
        there is no V condition code bit, there are no conditional branches for signed arithmetic;
        and because there is no HX register, there are no instructions for that register. And 6808
        special instructions, DAA, MOV, NSA, DIV, DBNZ, and CBEQ are missing.










                      Figure 12.6. Bits in the 6805 Condition Code Register
   374   375   376   377   378   379   380   381   382   383   384