Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/03/03 18:37
Read: times


 
#40596 - RE: comparison
Responding to: ???'s previous message
Comparing processors between the 8051 and the Motorola family is near to impossible because Morotola has such a range of products. However I can say that from price and general overview that Morotola's '08 series of controllers are most similar to quite a few of the modern 8051 variants.

I have direct experience with 8051 variants both through use of them in my projects and in looking at data sheets to ponder the use of 8051 type parts in future products (as well as to help people here on this forum get answers to their questions).

I also have designed Motorola 'HC05, 'HC08, 'HC11, 683xx, and ColdFire parts into designs. Of all of these the family most similar to the 8051 inarchitecture is the 'HC08 family. There are however quite a few common attributes across all of Motorola's 8-bit parts that are quite similar however.

Let me concentrate on the MC68HC908GO32 part which I have designed into products at least 10 times already. It is an 8 bit part with 32K onboard FLASH and 512 bytes RAM and about 28 I/Os.

Lets talk comparisons now:

I/O Pin Architecture:
8051 - Pins are bi-directional open drain usually with weak on-board pullup. Setting 1 in output reg enables input mode. Fast pullup in output mode requires pullup resistor or buffer.
HC08 -
Pins are uni-directional and direction selected by separate DDR (Data Direction Register) This allows for push pull outputs with fast rise times and good ability to drive capacitive bus lines.

Memory Model:
8051 - The memory model is setup with 3 address spaces - code memory, internal data memory, and "external" or "extended" data memory. Generically allows for 64K code, 256 byte internal data, and 64K extended data. Stack and internal data share space and limit total stack size.
HC08 - Memory organized as single 64K byte memory space. Stack can take advantage of local RAM to extent of its size. Data instructions easily access code space. And you can put code in local RAM and execute it.

Instruction Set Addressing Modes:
8051 - Local RAM is accesable with bit, byte, "register" and index modes. Access to the two 64K spaces is limited to the two unique MOVX and MOVC opcodes (often with the DPTR register which limits access speed).
HC08 - The local data memory & code space are accessable with address modes of short 8 bit direct, extended 16 bit direct, short 8 bit indexed, extended 16 bit indexed, short 8 bit stack relative, and extended 16 bit stack relative.

Memory Expansion:
8051 - Most variants support the extension of the code space and the extended data spaces out to full 64K bytes via an external bus structure. The internal RAM is strictly limited to the typical 128 or 256 bytes built on board.
HC08 - Most HC08 architecture parts have the memory they come with. Although there is a broad selection of parts available with a wide range of memory sizes. Only a few of the 'HC08 family parts have an external bus expansion mode. To add RAM you usually have to build an external software controlled bus on port pins.

Registers / Interrupts:
8051 - Has 8 Registers plus an accumulator. Support for 4 register banks for nice interrupt context switching. Saving registers on stack via push/pop is a kludge as only can push a direct memory location.
HC08 - Has A register accumulator and B work register. Also has a separate HX 16 bit indexing/data regster. Instruction set design permits all of first 256 bytes or RAM to be functional equivalent of registers. Push/Pull operations linited to A/H/X so saving direct locations in an interrupt is a pain.

Interrupt Vectors:
8051 - Vectors are at fixed locations in low memory. A vector address points right at executable code.
HC08 - Vectors are at fixed locations in high memory. A vector address points to a 16-bit object which is address of interrupt service routine.

Clocking Concept:
8051 - Standard 8051/8052 divide oscillator by 12 to derive bus cycle speed. Modern variants available with /6, /4, /3 and /1 modes. Almost any bus cycle speed attainable with suitable part selection up to 50MHz (even now 100MHz).
HC08 - Bus cycle speed is a divide by 4 from oscillator. Newer parts support Fosc to 32 MHz for bus cycle rates up to 8 MHz.

Timer Scheme:
8051 - Standard timers are the normal Intel types as typical from the original Intel 8254 type design. You know them on 8051 as TIMER0 and TIMER1. TIMER2 is more universal.
HC08 - Motorola timers always based on a Free Running Counter Core. Functionally similar to the PCA which is now seen on many of the 8051s.

There are probably many other things that could be compared but I will stop there. I can also give a few general opinions on comparison....

If working at the hardware design level there is really no difference if you use an 'HC08 or an 8051 variant. Both styles offer variety of available peripherals on board to meet almost any embedded design need.

When working in software at the assembly langage level it is a lot easier to get your arms around the 'HC08 instruction set and programmer model of the memory. I find it also more fun to program 'HC08 at the assembly language level. That said however once you learn the instructions and what they do it is possible to write most any algorithm on either platform.

When working in C language the 'HC08 stands out because of the stack relative addressing that allows C to work in a much more standard manner. If you run C on a 'HC08 at similar bus cycle speed as on a 8051 variant you will get better performance on the 'HC08 by a factor of about 2::1 IF you have need for more than 256 bytes of data memory and stack space. On an 8051 C will be functionally equivalent to HC08 if the data requirements of the program are below 256 bytes. However the newest 8051 variants such as the Cygnal parts oprerating at bus cycle rates of 25 MHz or more will beat the pants off a C implementation on an HC08 at 8 MHz bus cycle speed.

Michael Karas


List of 7 messages in thread
TopicAuthorDate
comparison            01/01/70 00:00      
   RE: comparison            01/01/70 00:00      
      RE: comparison            01/01/70 00:00      
   RE: comparison            01/01/70 00:00      
   RE: comparison            01/01/70 00:00      
      Ask 5 get 8            01/01/70 00:00      
   RE: comparison            01/01/70 00:00      

Back to Subject List