Spanish Italian
17109 Users    

How to migrate from Microchip to Freescale and Why

  Download PDF version of the Article

Competition in the semiconductor market is quite high, and one of its most diverse branches is the microcontroller market. It might not be complicated to select an opamp for your application, as you need to select from among 5-6 devices made by 3-4 manufacturers. When it comes to microcontrollers, however, component selection is one of the most important and difficult tasks of the design. There are so many peripherals, so many characteristics of the core, and so many requirements of the project that rely on the micro! All these determine which device you will be using.

The task of choosing the best micro for an application is not made easier by the multitude of suppliers you have at hand today, this being the drawback of having so many options (a drawback we, engineers, love to live with!). The main competitors on the microcontroller market are Freescale, Microchip, Infineon, STMicroelectronics, Texas Instruments, Analog Devices and Maxim Integrated Products. Comparing all of them is done by specialized and dedicated divisions within these companies or within marketing companies. We will only concentrate in this article to prove the superiority of the Freescale solutions over the ones coming from Microchip.

 


Short history of the two Companies
Freescale Semiconductor was created on the 6th of October 2003, following the announcement of Motorola that it would divest its semiconductor division. The new company focuses its integrated circuit products on the automotive, embedded and communications markets and is to be found among the Worldwide Top 20 Semiconductor Sales Leaders.

Microchip appeared in 1987 as a splinter group from General Instrument, which decided to spin off its microelectronics division. Microchip products include microcontrollers, DSPs, Serial EEPROM devices, Serial SRAM devices, KEELOQ devices, radio frequency (RF) devices, thermal, power and battery management analogue devices, as well as linear, interface and mixed signal devices. It is NOT to be found among the Worldwide Top 20 Semiconductor Sales Leaders (according to iSupply analysis reports).

Available Devices
The two companies target much of the same market sector through their microcontrollers and DSPs:

    * Automotive
    * Home Appliance
    * Motor Control
    * Mechatronics
    * Medical Solutions
    * Power Supply
    * Wired and Wireless Connectivity

Choosing one product over the other based on the technical capabilities can prove very difficult, as they basically run neck to neck in this respect (none of the two companies would have this business if it was not like this). Freescale, however, seems to have an edge in the diversity of its applications and in the preference given to it by the OEMs.

Take the automotive sector, for example. In the safety critical applications, Freeescale offers solutions for Airbag Control Units, for TPMS and ESP. Microchip, on the other hand is only providing TPMS solutions. As far as in-vehicle networking is concerned, Freescale offers also FlexRay communication systems, which is something that does not exist in Microchip portfolio. The vehicle body electronics is using a broad range of Freescale products in Body Control Modules, access and remote control products,ventilation and air conditioning solutions, lighting and doors/window actuation. From this list, Microchip is only able to match the Window lift/moon roof actuation.

The clear lead of Freescale is even more clearly visible when you take a look over the OEMs approved supplier list. Generally, when you design an automotive product, the customer (BMW, VW, PSA, Fiat, Toyota etc) has much saying in the very details of the design. And one detail which they control with “approved lists” is the main microcontroller on your board which acts as a CAN controller. Generally, Freescale is at the top of these approved lists, while there are some of them from which Microchip is missing altogether.

Many students found themselves in a position that after happily experimenting with PICs in the university using rather cheap development tools, they had to forget all about it and start learning the HC08, HCS08 or S12X because “the customer wants it”. I must admit, the presence of Microcip controllers in the universities is much more visible than that of Freescale, but that is not where the money is and it matters more who is on the OEMs lists.

Given all these, we will try to help people who find themselves in such a situation where conversion is necessary, by providing them with a basic comparison of the devices, the instructions and the development tools.

The following image is an extract from a table compiled by EMCElettronica which indicates the potential correspondence between some PIC and Freescale microcontrollers, based on technical characteristics. The full (but yet incomplete) list is available in the Download section (link provided at the end of the article).

 

 


Of course such a list will never be anything but far from perfect. There are so many variables that come into play when selecting an appropriate microcontroller (I/Os, supply voltage, PCB space, power consumption, memory size, peripherals etc) that such a comparison will never be more than a guideline, a starting point. This is how it should be regarded.

Instruction Set Comparison
From the mentioned list, a global observation can be made: 8bit PIC microcontrollers generally have equivalent in the Freescale HC908 subfamily of devices. It makes sense, therefore, to have a comparative view of the instructions for these two families only.

Although most applications are written in C, the assembly instruction set is still a good indicator regarding what a microcontroller can do and how it would perform under given circumstances.

Since there are quite a significant number of instructions to be taken into account, it is impractical to discuss here every one of them. Rather than doing that, I will highlight the instructions that do not have equivalents in one of the two competing families, or those which can be replaced by small groups of instructions from the other family (which could be grouped in macros).

Byte Oriented File Register Operations
Most of the byte oriented file register operations have equivalents in both Freescale HC908 and PIC micros. Register addition/subtraction to/from accumulator, complementing of a register, decrementing or incrementing it, left or right rotation through carry etc can all be performed through one 2 byte coded instructions, as these are operations performed by the majority of the microcotrollers available. Two increment/decrement instructions are available on the PICs, for which the HC908 family has no correspondence. These are:

Increment f, Skip if 0	 	INCFSZ
Decrement f, Skip if 0		DECFSZ

Bit Oriented File Register Operations
BCF, BSF, BTFSC, BTFSS all have corresponding instructions on the HC908microcontrollers (in the same order: BCLR, BSET, BRCLR, BRSET).
There is only one PIC micro instruction with no equivalent: BTG (toggles a bit in a register).

Literal and Control Operations
These are more numerous and therefore there are several instructions with no correspondence between the two families. As it may be seen below, the advantage clearly stays with the HC908 family, which has a few good control instructions which may only be replaced by groups or macros on the PICs. Comparatively, only two PIC instructions do not have equivalents. These are CLRWDT (clear watchdog timer) and RETLW (return with literal in accumulator).

The number of HC908 instructions that cannot be matched by the PICs, however, is quite high, and the best way to present them is through a table, which will also give information regarding the code snippet that would achieve the same with the Microchip products.

 

 

Add with Carry ADC BTFS STATUS,
INCF M,F
ADDWF M,F
Arithmetic Shift Left ASL BCF STATUS,
RLF M,F
Arithmetic Shif Right ASR BCF STATUS,
BTFSC M,7
BSF STATUS,C
RRF M,F
Branch if Carry Bit Clear BCC BTFSS STATUS,
GOTO addr
Branch if Carry Bit Set BCS BTFSC STATUS,
GOTO addr
Branch if Equal BEQ BTFSC STATUS,Z
GOTO addr
Branch if Greater than BGT BTFSS STATUS,N
BNOV rel
BTFSS STATUS,OV
BNN rel
Branch if Half Carry Bit Clear BHCC BTFSC STATUS,DC
GOTO addr
Branch if Half Carry Bit Set BHCS BTFSC STATUS,DC
GOTO addr
Branch if Higher BHI BTFSC STATUS,C
GOTO addr
BTFSC STAUTS,Z
GOTO addr
Branch if Higher or Same BHS BTFSS STATUS,C
GOTO addr
Branch if IRQ High BHI BTFSC PORTx, <pin>
GOTO addr
Branch if IRQ Low BIL BTFSS PORTx,<pin>
GOTO addr
Bit Test BIT MOVLW <mask>
ANDWF M,W
Branch if Lower BLO BTFSC STATUS,C
GOTO addr
Branch if Lower or Same BLS BTFSC STATUS,C
GOTO addr
BTFSC STATUS,Z
GOTO addr
Branch if IRQ Mask Clear BMC BTFSS INTCON, GIE
GOTO addr
Branch if Minus BMI BTFSC M,7
GOTO addr
Branch if IRQ Mask Set BMS BTFSC INTCON,GIE
GOTO addr
Branch if Not Equal BNE BTFSS STATUS,Z
GOTO addr
Branch if Plus BPL BTFSS M,7
GOTO addr
Branch if BIT n in
Memory Clear
BRCLR n BTFSS M,n
GOTO addr
Branch if Bit n in Menory Set BRSET n BTFSC M,n
GOTO addr
Compare and Branch if Equal CBEQ SUBWF M,W
BTFSC STATUS,Z
GOTO addr
Compare Index Register with
Memory
CPX MOVF M,W
SUBWF FSR,W
Decimal Adjust Accumulator DAA ADDLW 0x06
BTFSS STATUS,DC
GOTO $+3
ADDLW 0x10
GOTO $+2
ADDLW 0xFA
GOTO $+2
ADDLW 0xFA
ADDLW 0x60
BTFSS STATUS,DC
ADDLW 0xA0
Decrement and Branch if Not Zero DBNZ DECF M,F
BTFFSS STATUS,Z
GOTO addr
Divide DIV No corresponding instruction/macro
Load index Register From Memory LDX MOVF M,W
Memory MOVWF FSR
Logical Shift Left LSL BCF STATUS,C
RLF M,F
Logical Shift Right LSR BCF STATUS,C
RRF M,F
Move MOV MOVF M,W
MOVWF N
Multiply MUL MULWF
(not on all)
Store Index Register STHX MOV FSR, W
MOVWF M
Store Index Register Low
in Memory
STX MOVF FSR,W
MOVWF M
Test for Negative or Zero TST MOVLW O
SUBWF M,W
Add Immediate Value to Stack Point AIS No corresponding instruction/macro
Branch if Greater Than or Equal BGE No corresponding instruction/macro
Branch if Greater Than BGT No corresponding instruction/macro
Branch if Less than or Equal to BLE No corresponding instruction/macro
Branch if Less than BLT No corresponding instruction/macro
Compare index Register with memory CPHX No corresponding instruction/macro
Load Index Register From Memory LDHX No corresponding instruction/macro
Push Accumulator onto Stack PSHA No corresponding instruction/macro
Push Index Register High onto Stack PSHH No corresponding instruction/macro
Push Index Register Low onto Stack PSHX No corresponding instruction/macro
Pull Accumulator from Stack PULA No corresponding instruction/macro
Pull Index Register High from Stack PULH No corresponding instruction/macro
Pull Index Register Low from Stack PULX No corresponding instruction/macro
Reset Stack Pointer RSP No corresponding instruction/macro
Transfer Stack Pointer to Index Register TSX No corresponding instruction/macro
Transfer Index Register to Stack Pointer TXS No corresponding instruction/macro


As it may be seen, a significantly higher number of assembly instructions are available on the Freescale microcontrollers. Most of them are control/branching operations and stack operation instructions. These would enable C compilers to generate more efficient code and would thus minimize the amount of program memory required by an application. It would also make things easier for assembly programmers, who would simply have more choices when elaborating the code. A few good stack operating instructions also make saving the context in interrupts easier on the Freescale microcontrollers than on PICs.

Software development tools comparison
I will briefly mention the two IDE packages marketed by the two companies. Microchip uses the all too known MPLAB IDE. It has the big advantage of being free, and includes a development environment, a simulator and debugging capabilities. It is only available, though, for Windows.
MPLAB Integrated Development Environment

The environment itself is free to use, but the C compiler is not. Yet, you can successfully use it for small assembly projects or you may download student version of the Microchip developed C compilers (running for 30 days – again it depicts a university oriented mentality). Also third party C compilers are available and can be integrated in MPLAB.

The simulator of MPLAB is quite good, and at some point in time Microchip also provided access to some VHDL type code that would have allowed the user to describe detailed stimuli for both I/O pins and registers. The feature was not supported through documentation though, and its use was very limited.

The corresponding tool of Freescale is CodeWarrior

This development environment is available on multiple operating systems (MAC, Windows, Linux, Solaris) which is a good advantage over Microchip. Although CodeWarrior is not free, some releases which allow limited amounts of code to be compiled are made freely available on the Freescale website. The limit is quite high and many companies use it for development, rather than for evaluation only. In terms of features the two IDEs are quite similar. CodeWarrior also features a simulator and allows debug tools to be completely integrated. The way registers can be visualised seems to be a little better developed in the Freescale tool as these may be mapped to various objects like LED displays, or 7 segment displays etc.

Another EMCElettronica tutorial-like article, detailing the usage of the CodeWarrior environment (and simulator) may be found under: Getting Started with CodeWarrior IDE from Freescale

Conclusion
While quite equal in many aspects of their microcontrollers, the Freescale products seem to have the edge in a few good fields, and this could be a good enough motivation for many PIC adepts to start a migrating activity. There are some devices that may be found in Microchip portfolio that cannot be matched in terms of footprint size by Freescale, but there is also an impressive array of finished products in which Freescale micros seem to be leading. Most of the 8-bit PICs have correspondents in the Freescale devices, and this is also valid for the dsPIC range of devices.
The complete EMCelettronica list that illustrates the correspondence between many microcontrollers from the two companies is available under the Downloads section (Microchip_Freescale_EMCElettronica list.xls), which you may only access after registering.

CONTACT REQUEST
If you want to know more about this Freescale product, please submit your request to Arrow Italy using this form.

NOTE: this form is valid ONLY for Companies or Customers based in Italy and working in the Italian area.

Read the Italian version: Come migrare da Microchip a Freescale e Perchè

Interesting points

Very interesting points!

Microchip promotes its microcontroller as "RISC" like. I have to say it is a totally marketing word. Because RISC is a terminology used in microprocessor domain which involves many concepts, not only in ISA, but also HLL compilers, memory management, cache and buses. The PIC10/12 is a simplified programmable microcontroller with reduced instruction. If you are programming in "RISC", you find it requires more instructions for conditional branches and bit operations. Moto's 68HCXX is a typical "CISC" microcontrollers, which is highly respected in many applications, especially in automotives.

If we look into commercial factors, PIC has many clone versions in Taiwan, because Microchip doesn't own the IP for PIC, which was left in GI. You can consider clone version as your second source with worse quality and slightly differences. Freescale can license its IP to customers for custom products.

Freescale's MCUs product

Freescale's MCUs product lines and the company itself are both a mess. Microchip will be around in 5-10 years. I don't have the same confidence that most of Freescale will be.

RE: Freescale's MCUs product

This is a very strong comment! Do not mistake the popularity the PICs enjoy in the universities for market share or perspectives. Actually, it is Freescale, I believe, the one which has the upper hand in critical sectors like automotive, for instance. And it will never disappear. It may get bought, or change its name, but I would almost make a bet that after 5 years from now on, Frrescale will still be in place the way we know it today.

Regards,
Cristian

Advancing Tech Issues

Do you think that there's a sector of the economy that uses this new technology that will help create a demand for either one of these?

I mean if for example Mac had a very successful product in the future that used one over the other, I can see that influencing the long term success of either.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
7 + 8 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Who's new

  • john.wills14
  • soket
  • Wynn Quat GH
  • ryogeshram
  • vasuvthu
  • syaungere
  • manohar.boni
  • leetkd
  • ganmal
  • changoleon

Who's online

There are currently 0 users and 78 guests online.