Exploring Embedded C Programming
|
|
- Ella Woods
- 7 years ago
- Views:
Transcription
1 Laboratory Short Course Exploring Embedded C Programming Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners Freescale Semiconductor, Inc Document Number: LABS12CINTRO06S /REV 2
2 Reading this Document Answers provided to the Instructor assume that the reader is using Freescale HCS12C Family Student Learning Kit, and CodeWarrior development software. This short course has been created using an adapted version of the Process Oriented Guided Inquiry Learning (POGIL) method. For more information visit Freescale Semiconductor LABS12CINTRO06S, Rev 2 1
3 Overview We must change some of the ways we think about programs and learn some new tools and techniques when we change from programming a desktop application to an embedded application. This module assumes you have learned C in another course and will help you explore the features that have been added to your compiler to deal with the special requirements of an embedded application. Learning Objectives In this module you will learn some of the additional responsibilities of a programmer writing an application for an embedded system instead of a desktop or personal computer application. You will learn what the startup code does and how and when to use the volatile property of a variable. You will also learn how a C program can access I/O registers, how assembly language programs can be mixed with C functions, and how a C program can be written to handle interrupts. Success Criteria When you complete this module you will be able to explain what the C program startup code does and will be able to show when a volatile variable must be declared. You will also be able to demonstrate that a C program can access a control register in a fixed memory location and how to use bit set and bit clear instructions when needed. Prerequisites You must be able to write assembly or C programs for your microcontroller, be able to produce a list file showing the assembly code produced by the compiler, and be able to simulate C programs or run them on a student learning kit in the laboratory. More Resources and Further Information Cady, Fredrick M., Software and Hardware Engineering: Assembly and C Programming for the Freescale HCS12 Microcontroller, 2 nd edition. (New York: Oxford University Press, Inc., 2008), Chapter 10 Program Development Using C. Freescale HC12 Compiler, Freescale Semiconductor, Inc., Austin, TX Revision 1.2, 9/9/03, (hc12compilerrm.pdf) HC(S)12 Compiler Manual, Freescale Semiconductor, Inc., Austin, TX, Revised 30 November 2006, (CW_compiler_HC12_RM.pdf) MC9S12C/MC9S12GC Family Data Sheet, Freescale Semiconductor, Inc., Austin, TX 03/2006 Comparision of Embedded and Desktop C Programs Although C gives embedded system programmers a high-level language, we must be aware of differences between the embedded and the desktop application worlds. In an embedded system the programmer must pay closer attention to the memory architecture and I/O capabilities than when writing desktop applications. In particular, you should be able to answer the following questions: What are the locations and the number of bytes of RAM and ROM in your microcontroller? What I/O capabilities exist and what are the addresses of control registers? How does the C program address a specific memory or I/O control register location? If an application needs an assembly language routine, how does the C program interface with an assembly language function? Can assembly language instructions be included in your C program? If so, how is that done? Can the C program address memory locations in expanded memory where the address range is outside the "normal" addresses of the microcontroller? How does the C program deal with interrupts and interrupt handlers or interrupt service routines? What data types does your compiler support and how are they stored in memory? Freescale Semiconductor LABS12CINTRO06S, Rev 2 2
4 Explore Find the memory map of your microcontroller and list the address ranges of RAM and ROM. 2. What data types does your compiler support and how many bits of storage are required for each? The Outline of an Embedded C Program Any C program contains the following elements: Start-Up Code: The start-up code initializes the microcontroller hardware such as the stack pointer, watchdog timer (COP), and other microcontroller features. It also initializes any variable data in RAM either with a value as specified in your program or with zero. void main( void ): Your program must always have a main(), which is executed after the start-up code. Program Functions: Any well designed program will have functions in addition to main() to do required processing. Interrupt Handler Functions: Interrupt functions are not normally found in desktop applications but are used frequently in embedded systems. Special extensions to an ANSI C compiler are required. Variables: Variables in C may be automatic or static depending on where and how they are defined. Static Variables: Static variables may be declared either inside or outside a function. They are allocated a specific memory location in RAM and although they may or may not be globally visible, their lifetime persists from one function call to another. Automatic Variables: Variables that are declared inside a function but are not also declared as static are called automatic variables. No other function can access them and they are valid only during the functions execution time. Automatic variables are allocated storage on the stack. As an embedded system engineer, we must be sure the system has enough stack storage space to accommodate the automatic variables in a function. Volatile Variables: A volatile variable is one whose value may change due to an outside force or event. n example is data that are read from an I/O port. We must declare these volatile to avoid compiler optimization that may eliminate necessary code. Stimulate What does "scope" of a variable mean? 2. A variable is defined inside a function and the compiler does not allocate a specific memory location in RAM for its storage. a. Is this an automatic or static variable? b. Where is it stored? c. What is its scope? d. Is data stored in this variable during one function call available to the function in the next call? 3. A static variable is defined inside a function. a. What is its scope? b. Where is storage space allocated for it? c. Is data stored in this variable during one function call available to the function in the next call? 4. A variable is defined outside a function. a. Is this a static or automatic variable? b. If another separately compiled function wishes to use this variable, what must be done in this function to do this? Initializing Variables Static and externally defined variables are allocated storage in RAM and initialized by the start-up code to either zero or to an initial value given in your program. Automatic variables are allocated storage on the stack. Any automatic variables that must be initialized Freescale Semiconductor LABS12CINTRO06S, Rev 2 3
5 are done when a function is entered. Automatic variables that do not have some initial value are simply written when the code requires them to have some value. Explore 2. Enter the small C program below. Choose ANSI Startup mode when creating the project in CodeWarrior. It will allow you to explore the start-up code provided by your compiler. Compile it and prepare to run it on your simulator. /* External data */ char i2_final = 0x22; /* Initialized value */ void main(void) { char i1; /* Automatic variable */ static char i2; /* Static variable */ char i3=3; /* Automatic initialized variable */ static char i4=4; /* Static initialized variable */ } for (i1=0;i1<i4;++i1){ i2 = i3 * i1; } i2_final = i2; for(;;) {} /* wait forever */ Run the program in your simulator. Change the memory watch window to display the RAM memory (0x08F0 0x0920) and step through the start-up code using the assembly language single step feature. 1. Where is storage allocated for the variable char i2_final? 2. In what part of the code is i2_final initialized with 0x22? 3. Where is storage allocated for the variable char i1? 4. Is i1 initialized with any value by the _Startup() code? 5. Where is storage allocated for the variable char i2? 6. Is i2 initialized with any value by the _Startup() code? 7. Where is storage allocated for the variable char i3? 8. Is i3 initialized with any value by the _Startup() code? If not, when is it initialized? 9. Where is storage allocated for the variable char i4? 10. Is i4 initialized with any value by the _Startup() code? 11. What do you predict the final value of i2 to be? Is it? Explore 3. Repeat Explore 2 but this time creat a new project and select the Minimal Startup option. 1. You should get an error or warning when you make the project? What does it mean? Freescale Semiconductor LABS12CINTRO06S, Rev 2 4
6 2. What changes must you make to your program to compensate for the problem? 3. Make the changes to your program and verify that the final value of i2_final is the same as in Explore 2. Stimulate If you are familiar with assembly language programming you may know that comparing signed and unsigned numbers requires different assembly language conditional branches. What changes would you expect to see in the assembly code for the program if you changed all char variables from signed to unsigned char? Volatile Variables Volatile variables are those whose values may change from outside the program. For example, you may wish to read an A/D converter several times. Explore Enter the following program using the ANSI Startup option and investigate what happens when p_atd is not declared volatile and then is declared volatile. /* Define pointer to the ATD data register */ #define p_atd (unsigned char *) 0x0090 void main(void) { static unsigned char atd_input1; atd_input1 = *p_atd; /* Do something else for a while */ /* Now read the atd again */ atd_input1 = *p_atd; /* Did you get code to read the atd_port twice? */ } for(;;) {} /* wait forever */ 2. What happens when p_atd is not declared volatile? a. Check the listing file produced by your compiler showing the assembly language code produced for the program shown above. Compile the program twice. Once with the p_atd definition #define p_atd (unsigned char *) 0x0090 and then again with #define p_atd (volatile unsigned char *) 0x In this exercise you should find that in the first case the compiler generates code to read the ATD value only once; when ATD is declared volatile, the value should be read twice. 4. There are no instructions between the two lines that read the ATD in the example above. What does your compiler do if you add something to the program between these two instructions, say a function call or some other instructions? Connecting a C Program to an Assembly Language Program There are two components of a C program's assembly language interface. The first allows you to insert assembly language Freescale Semiconductor LABS12CINTRO06S, Rev 2 5
7 instructions "in-line" with ordinary C statements. You may wish to do this for special purposes such as unmasking or masking interrupts if your compiler does not provide a library function to do this. Another aspect of the assembly language interface arises when you wish to use an assembly language function in your C program. This is done often for special purpose I/O or to take advantage of assembly language features. To transfer arguments to and from the assembly language program, the C program will use CPU registers as much as possible and use the stack for the remaining arguments. Explore Does your compiler allow you to insert assembly language instructions "in-line" with your C code? If so, how do you do this? 2. How does your C program transfer arguments to and from the assembly language program? Accessing I/O Registers In most microcontrollers the I/O registers are at fixed addresses, and often we must read from or write to these registers. Your compiler may have a special way to define these registers or you may use the following, more portable, definition: /* Declare p_portb to be a pointer to the address of PORTB */ #define p_portb (volatile unsigned char *) 0x0001 Explore Determine if your compiler has a way to assign a global variable to a specific address. If so, add sufficient statements to the following program to test that using the compiler's assignment generates code that reads from and writes to a port. /* Define pointers to the HCS12 ATD port registers */ /* ATD Data register */ #define p_atd (volatile unsigned char *) 0x0090 /* ATD Start convert register */ #define p_atdctl5 (unsigned char *) 0x0085 /* Value to start the ATD */ #define START_CONVERT 0x81 /* ATD Status register */ #define p_atdstat0 (unsigned char *) 0x0086 /* Sequence complete flag */ #define SCF 0x80 void main(void) { static unsigned char atd_value1; /* Start the ATD */ *p_atdctl5 = START_CONVERT; /* Wait for the ATD to finish */ Freescale Semiconductor LABS12CINTRO06S, Rev 2 6
8 while ( (*p_atdstat0 & SCF) == 0); } /* Read the ATD */ atd_value1 = *p_atd; for(;;) {} /* wait forever */ Using Individual Bits in a Memory Location Unlike a desktop application, your embedded application has many instances where it must either read or write a specific bit in a control register. Your microcontroller probably has instructions specially included to set or clear these bits without disturbing other bits in the register. It is important that your compiler generates the proper bit set or bit clear instructions when you want to do this. Explore ANSI C provides a way to define bit fields that are addressed individually using the bitwise inclusive OR and bitwise AND operators. Enter the following program and verify that your compiler generates bit set and bit clear instructions. /*****************************************************************/ /* Define the bit positions */ #define B0 1 #define B1 2 #define B2 4 #define B3 8 #define B4 16 #define B5 32 #define B6 64 #define B7 128 /* Define location of PORTX */ #define PORTX (*(volatile unsigned char *) 0x0270) /* Define a pointer to PORTY */ #define p_porty (volatile unsigned char *) 0x0280 void main(void) { /* These instruction generate bit-set and bit-clr * instructions */ /* Strobe PORTX bit-0 */ PORTX = PORTX B0; /* Set the bit high */ PORTX &= ~B0; /* Set the bit low */ /* Strobe PORTY bit-1 */ *p_porty = B1; /* Set the bit high */ Freescale Semiconductor LABS12CINTRO06S, Rev 2 7
9 } *p_porty = *p_porty & ~B1; Using Interrupts Interrupts are an important part of many embedded applications. Although an interrupt request is much like a hardware actuated function call, it differs from a "normal" function call in several important ways. Before entering the interrupt handler function, all CPU registers must be saved on the stack. Any transfer of information between the interrupt handler and other parts of the program must be done with globally defined data. A special return from interrupt instruction must be executed at the end of the interrupt handler to restore all CPU registers from the stack. Explore Does your compiler support interrupt service routines? If so, how do you signify to the compiler that a function should be treated as an interrupt handler or service routine? Stimulate What makes an interrupt handler or service routine different than an "ordinary" function? Problem Your ANSI C compiler uses the const declaration for a "variable" to specify that the value is not to be changed. This is useful to make sure that you do not accidentally write code that changes it. In some situations the compiler may use this definition just like #define (a constant known at compile-time) and in others it may allocate (and initialize) a ROM memory location. Write a small program that demonstrates how the compiler may use a "constant variable" in these two ways. Make sure that your compiler will give an error message if you try to change the variable. Communication Reporting Submit a memo report including listing files for any modules written for Problem 1. Point out the specific lines in your code where the compiler has used a const as a defined value at compile-time and where it has allocated and used ROM memory storage. Reflection on Learning In this module you have explored how the C language compiler creates code for you. Are you curious about how the compiler does other things? What strategy would you use to investigate and satisfy your curiosity? Freescale Semiconductor LABS12CINTRO06S, Rev 2 8
10 Revision History Revision Comments Author 0 Initial Release Fred Cady 1 Updated to CodeWarrior 4.6 Fred Cady 2 Miscellaneous edits Fred Cady Freescale Semiconductor LABS12CINTRO06S, Rev 2 9
11 How to Reach Us: Home Page: Web Support: USA/Europe or Locations Not Listed: Freescale Semiconductor, Inc. Technical Information Center, EL East Elliot Road Tempe, Arizona or Europe, Middle East, and Africa: Freescale Halbleiter Deutschland GmbH Technical Information Center Schatzbogen Muenchen, Germany (English) (English) (German) (French) Information in this document is provided solely to enable system and software implementers to use Freescale Semiconductor products. There are no express or implied copyright license granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document. Freescale Semiconductor reserves the right to make changes without further notice to any products herein. Freescale Semiconductor makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Freescale Semiconductor assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. Typical parameters which may be provided in Freescale Semiconductor data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including Typicals must be validated for each customer application by customer s technical experts. Freescale Semiconductor does not convey any license under its patent rights nor the rights of others. Freescale Semiconductor products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Freescale Semiconductor product could create a situation where personal injury or death may occur. Should Buyer purchase or use Freescale Semiconductor products for any such unintended or unauthorized application, Buyer shall indemnify and hold Freescale Semiconductor and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Freescale Semiconductor was negligent regarding the design or manufacture of the part. Japan: Freescale Semiconductor Japan Ltd. Headquarters ARCO Tower 15F 1-8-1, Shimo-Meguro, Meguro-ku, Tokyo Japan or support.japan@freescale.com Asia/Pacific: Freescale Semiconductor Hong Kong Ltd. Technical Information Center 2 Dai King Street Tai Po Industrial Estate Tai Po, N.T., Hong Kong support.asia@freescale.com For Literature Requests Only: Freescale Semiconductor Literature Distribution Center P.O. Box 5405 Denver, Colorado or Fax: LDCForFreescaleSemiconductor@hibbertgroup.com Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. ARM is the registered trademark of ARM Limited. ARM9, ARM11, and ARML210 are the trademarks of ARM Limited. Java and all other Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. The PowerPC name is a trademark of IBM Corp. and used under license. Freescale Semiconductor, Inc Document Number: LABS12CINTRO06S /REV 2
etpu Host Interface by:
Freescale Semiconductor Application Note AN2821 Rev. 2, 08/2007 etpu Host Interface by: David Paterson Ming Li MCD Applications 1 Introduction This application note discusses the enhanced Time Processing
More informationInstallation of the MMA955xL CodeWarrior Service Pack Author: Fengyi Li Application Engineer
Freescale Semiconductor Application Note Document Number: AN4128 Rev. 0, 10/2011 Installation of the MMA955xL CodeWarrior Service Pack Author: Fengyi Li Application Engineer 1 Overview The Freescale MMA955xL
More informationHow To Build A Project On An Eclipse Powerbook For Anarc (Powerbook) On An Ipa (Powerpoint) On A Microcontroller (Powerboard) On Microcontrollers (Powerstation) On Your Microcontroller 2 (Powerclock
Freescale Semiconductor Document Number: AN4819 Application Note Rev. 1, 10/2013 Building a Project using IAR Eclipse Plugin Processor Expert Microcontrollers Driver Suite Processor Expert Microcontrollers
More informationPowerQUICC II Pro (MPC83xx) PCI Agent Initialization
Freescale Semiconductor Application Note Document Number: AN3373 Rev. 0, 04/2007 PowerQUICC II Pro (MPC83xx) PCI Agent Initialization by: David Smith Field Application Engineering Raleigh, NC In many designs,
More informationWindows 7: Using USB TAP on a Classic CodeWarrior Installation (MGT V9.2 DSC V8.3)
Freescale Semiconductor Document Number: AN4338 Application Note Rev. 1.0, 12/2011 Windows 7: Using USB TAP on a Classic CodeWarrior Installation (MGT V9.2 DSC V8.3) Technical Information & Commercial
More informationData Movement Between Big-Endian and Little-Endian Devices
Freescale Semiconductor Application Note AN2285 Rev. 2.2, 3/2008 Data Movement Between Big-Endian and Little-Endian Devices by Kyle Aubrey, Field Technical Leader Ashan Kabir, System Engineering Freescale
More informationInitializing the TSEC Controller
Freescale Semiconductor Application Note Document Number: AN2925 Rev. 0, 11/2005 Initializing the TSEC Controller by Ahsan Kabir Digital Systems Division Freescale Semiconductor, Inc. Austin, TX This application
More informationLocal Interconnect Network (LIN) Physical Interface
Freescale Semiconductor Engineering Bulletin EB215 Rev. 1.0, 03/2005 Local Interconnect Network (LIN) Physical Interface Difference Between MC33399 and MC33661 Introduction This engineering bulletin highlights
More informationCyclic Redundant Checker Calculation on Power Architecture Technology and Comparison of Big-Endian Versus Little-Endian
Freescale Semiconductor Document Number:AN4657 Application Note Rev. 0, 01/2013 Cyclic Redundant Checker Calculation on Power Architecture Technology and Comparison of Big-Endian Versus Little-Endian by:
More informationProgramming Audio Applications in the i.mx21 MC9328MX21
Freescale Semiconductor Application Note Document Number: AN2628 Rev. 1, 10/2005 Programming Audio Applications in the MC9328MX21 by: Alfred Sin 1 Abstract The MC9328MX21 () processor has two dedicated
More informationHandling Freescale Pressure Sensors
Freescale Semiconductor Application Note Rev 3, 11/2006 Handling Freescale Pressure by: William McDonald INTRODUCTION Smaller package outlines and higher board densities require the need for automated
More informationBlood Pressure Monitor Using Flexis QE128 Gabriel Sanchez RTAC Americas
Freescale Semiconductor Application Note Document Number: AN3500 Rev. 0, 08/2007 Blood Pressure Monitor Using Flexis QE128 by: Gabriel Sanchez RTAC Americas 1 Introduction Product designers and developers
More informationPerformance Monitor on PowerQUICC II Pro Processors
Freescale Semiconductor Application Note Document Number: AN3359 Rev. 0, 05/2007 Performance Monitor on PowerQUICC II Pro Processors by Harinder Rai Network Computing Systems Group Freescale Semiconductor,
More informationConnecting Low-Cost External Electrodes to MED-EKG
Freescale Semiconductor Document Number: AN4223 Application Note Rev. 0, 11/2010 Connecting Low-Cost External Electrodes to MED-EKG by: Carlos Casillas RTAC Americas Guadalajara Mexico 1 Introduction This
More informationFlexible Active Shutter Control Interface using the MC1323x
Freescale Semiconductor Document Number: AN4353 Application Note Rev. 0, 9/2011 Flexible Active Shutter Control Interface using the MC1323x by: Dennis Lui Freescale Hong Kong 1 Introduction This application
More informationImproving Embedded Software Test Effectiveness in Automotive Applications
Improving Embedded Software Test Effectiveness in Automotive Applications Author, D Brook Document Number: CODETESTTECHWP Rev. 0 11/2005 As the automotive industry introduces more and more safety-critical,
More informationIRTC Compensation and 1 Hz Clock Generation
Freescale Semiconductor Document Number: AN4257 Application Note Rev. 0, January 2011 IRTC Compensation and 1 Hz Clock Generation by: Derek Liu Applications Engineering Shanghai 1 Introduction The MC9S08GW64
More informationFreescale Embedded GUI Converter Utility 2.0 Quick User Guide
Freescale Semiconductor User Guide Document Number: EGUICUG Rev. 1, 08/2010 Freescale Embedded GUI Converter Utility 2.0 Quick User Guide 1 Introduction The Freescale Embedded GUI Converter Utility 2.0
More informationUsing WinUSB in a Visual Studio Project with Freescale USB device controller
Freescale Semiconductor Document Number: AN4378 Application Note Rev. 0, 10/2011 Using WinUSB in a Visual Studio Project with Freescale USB device controller by: Paolo Alcantara Microcontroller Solutions
More informationSoftware Real Time Clock Implementation on MC9S08LG32
Freescale Semiconductor Document Number: AN4478 Rev. 0, 03/2012 Software Real Time Clock Implementation on MC9S08LG32 by: Nitin Gupta Automotive and Industrial Solutions Group 1 Introduction The MC9S08LG32
More informationConnecting to an SMTP Server Using the Freescale NanoSSL Client
Freescale Semiconductor Document Number: AN4363 Application Note Rev. 0, 10/2011 Connecting to an SMTP Server Using the Freescale NanoSSL Client by: Paolo Alcantara Microcontroller Solutions Group 1 Introduction
More informationUnderstanding LCD Memory and Bus Bandwidth Requirements ColdFire, LCD, and Crossbar Switch
Freescale Semiconductor Application Note Document Number: AN3606 Rev. 0, 03/2008 Understanding LCD Memory and Bus Bandwidth Requirements ColdFire, LCD, and Crossbar Switch by: Melissa Hunter TSPG Applications
More informationPoint-of-Sale (POS) Users Guide Lech José Olmedo Guerrero Jaime Herrerro Gallardo RTAC Americas
Freescale Semiconductor Users Guide Document Number: POSUG Rev. 0, 03/2007 Point-of-Sale (POS) Users Guide by: Lech José Olmedo Guerrero Jaime Herrerro Gallardo RTAC Americas 1 Introduction This quick
More informationHow To Control A Motor Control On An Hvac Platform
Freescale Semiconductor Document Number:AN4616 Application Note Rev. 0, 10/2012 Flap Motor Control Based On HVAC Platform by: Shawn Shi, Albert Chen, Alex Liu 1 Introduction According to the world market
More informationGenerate Makefiles from Command Line Support in Eclipse-Based CodeWarrior Software
Freescale Semiconductor Document Number: AN4272 Application Note Rev. 0, 03/2011 Generate Makefiles from Command Line Support in Eclipse-Based CodeWarrior Software by Devtech Customer Engineering Freescale
More informationUser Interface Design using CGI Programming and Boa Web Server on M5249C3 Board
Freescale Semiconductor Application Note AN3238 Rev. 0, 02/2006 User Interface Design using CGI Programming and Boa Web Server on M5249C3 Board by: H.K. Au MCD Applications 1 Introduction This application
More informationMC13783 Buck and Boost Inductor Sizing
Freescale Semiconductor Application Note Document Number: AN3294 Rev. 0.1, 01/2010 MC13783 Buck and Boost Inductor Sizing by: Power Management Application Team 1 Introduction The purpose of this application
More informationSoftware Marketing, Embedded Real-Time Solutions
Software Marketing, Embedded Real-Time Solutions Author, Katie Smith Document Number: BARRIERSWP Rev. 0 11/2005 The current economic climate is adding to the increasing pressure being experienced in new
More informationHardware Configurations for the i.mx Family USB Modules
Freescale Semiconductor Application Note Document Number: AN4136 Rev. 0, 06/2010 Hardware Configurations for the i.mx Family USB Modules by Multimedia Applications Division Freescale Semiconductor, Inc.
More informationUsing the Performance Monitor Unit on the e200z760n3 Power Architecture Core
Freescale Semiconductor Document Number: AN4341 Application Note Rev. 1, 08/2011 Using the Performance Monitor Unit on the e200z760n3 Power Architecture Core by: Inga Harris MSG Application Engineering
More informationUSB HID bootloader for the MC9S08JM60
Freescale Semiconductor Document Number: AN4252 Application Note Rev. 0, 4/2011 USB HID bootloader for the MC9S08JM60 by: Derek Lau System and Solution Engineering, Microcontroller Solutions Group Hong
More information3-Phase BLDC Motor Control with Hall Sensors Using 56800/E Digital Signal Controllers
Freescale Semiconductor Application Note AN1916 Rev. 2.0, 11/2005 3-Phase BLDC Motor Control with Hall Sensors Using 56800/E Digital Signal Controllers Leonard N. Elevich Contents 1. Application Benefits...1
More informationDetecting a CPM Overload on the PowerQUICC II
Freescale Semiconductor Application Note Document Number: AN2547 Rev. 1, 11/2006 Detecting a CPM Overload on the PowerQUICC II by Qiru Zou NCSD Applications Freescale Semiconductor, Inc. Austin, TX This
More informationVGA Output using TV-Out Extension Solution i.mx21
Freescale Semiconductor Application Note Document Number: AN3378 Rev. 0, 11/2006 VGA Output using TV-Out Extension Solution i.mx21 by: Tatiana Orofino 1 Abstract Freescale first thought of a TV-Out Extension
More informationPQ-MDS-T1 Module. HW Getting Started Guide. Contents. About This Document. Required Reading. Definitions, Acronyms, and Abbreviations
HW Getting Started Guide PQ-MDS-T1 Module April 2006: Rev. 0.3 Contents Contents................................................................................. 1 About This Document.......................................................................
More informationFreescale Semiconductor. Integrated Silicon Pressure Sensor. On-Chip Signal Conditioned, Temperature Compensated and Calibrated MPX4080D.
Freescale Semiconductor Integrated Silicon Pressure Sensor + On-Chip Signal Conditioned, Temperature Compensated and Calibrated The series piezoresistive transducer is a state-of-the-art monolithic silicon
More informationHow to Convert 3-Axis Directions and Swap X-Y Axis of Accelerometer Data within Android Driver by: Gang Chen Field Applications Engineer
Freescale Semiconductor Application Note Document Number: AN4317 Rev. 0, 08/2011 How to Convert 3-Axis Directions and Swap X-Y Axis of Accelerometer Data within Android Driver by: Gang Chen Field Applications
More informationUsing Program Memory As Data Memory. 1. Introduction. 2. 56800 Program Memory and Data. Contents. Memory. Freescale Semiconductor Application Note
Freescale Semiconductor Application Note AN1952 Rev. 0, 9/2005 Using Program Memory As Data Memory William Jiang 1. Introduction Microcontrollers with Harvard architecture have separate program and data
More informationUsing XGATE to Implement LIN Communication on HCS12X Daniel Malik 8/16-Bit Products Division East Kilbride, Scotland
Freescale Semiconductor Application Note Document Number: AN2732 Rev. 0, 05/2004 Using XGATE to Implement LIN Communication on HCS12X By Daniel Malik 8/16-Bit Products Division East Kilbride, Scotland
More informationProcessor Expert Software Microcontrollers Driver Suite Getting Started Guide
Freescale Semiconductor Document Number: PEXDRVSGETSTARTEDUG Rev. 2, 09/2012 Processor Expert Software Microcontrollers Driver Suite Getting Started Guide This document introduces Microcontrollers Driver
More informationUsing eflexpwm Module for ADC Synchronization in MC56F82xx and MC56F84xx Family of Digital Signal Controllers
Freescale Semiconductor Document Number:AN4675 Application Note Rev. 0, 01/2013 Using eflexpwm Module for ADC Synchronization in MC56F82xx and MC56F84xx Family of Digital Signal Controllers by: Pavel Grasblum
More informationTechniques and Tools for Software Analysis
Techniques and Tools for Software Analysis Freescale Semiconductor Document Number: CODETESTTECHWP Rev. 0 11/2005 Understanding how software development can be optimized through the use of software analysis
More informationMCF54418 NAND Flash Controller
Freescale Semiconductor Application Note Document Number: AN4348 Rev. 0, 09/2011 MCF54418 NAND Flash Controller by: Liew Tsi Chung Applications Engineer 1 Introduction The ColdFire MCF5441x family is the
More informationFreescale Semiconductor. Integrated Silicon Pressure Sensor. On-Chip Signal Conditioned, Temperature Compensated and Calibrated MPX5500.
Freescale Semiconductor Integrated Silicon Pressure Sensor + On-Chip Signal Conditioned, Temperature Compensated and Calibrated Series Pressure Rev 7, 09/2009 0 to 500 kpa (0 to 72.5 psi) 0.2 to 4.7 V
More informationEfficient Low-Level Software Development for the i.mx Platform
Freescale Semiconductor Application Note Document Number: AN3884 Rev. 0, 07/2009 Efficient Low-Level Software Development for the i.mx Platform by Multimedia Applications Division Freescale Semiconductor,
More informationImplementing Positioning Algorithms Using Accelerometers
Freescale Semiconductor Application Note Rev 0, 02/2007 Implementing Positioning Algorithms Using Accelerometers by: Kurt Seifert and Oscar Camacho OVERVIEW This document describes and implements a positioning
More informationMPC8245/MPC8241 Memory Clock Design Guidelines: Part 1
Freescale Semiconductor AN2164 Rev. 4.1, 03/2007 MPC8245/MPC8241 Memory Clock Design Guidelines: Part 1 by Esther C. Alexander RISC Applications, CPD Freescale Semiconductor, Inc. Austin, TX This application
More informationInstalling Service Pack Updater Archive for CodeWarrior Tools (Windows and Linux) Quick Start
Installing Service Pack Updater Archive for CodeWarrior Tools (Windows and Linux) Quick Start SYSTEM REQUIREMENTS Processor Windows OS: Intel Pentium 4 processor, 2 GHz or faster, Intel Xeon, Intel Core,
More informationFreescale Variable Key Security Protocol Transmitter User s Guide by: Ioseph Martínez and Christian Michel Applications Engineering - RTAC Americas
Freescale Semiconductor User s Guide VKSPTXUG Rev. 0, 06/2008 Freescale Variable Key Security Protocol Transmitter User s Guide by: Ioseph Martínez and Christian Michel Applications Engineering - RTAC
More informationEnhanced Serial Interface Mapping
Freescale Semiconductor Application Note Document Number: AN3536 Rev. 1, 11/2007 Enhanced Serial Interface Mapping 16 E1/T1 QUICC Engine Solution for TDM Connectivity by Netcomm Applications Networking
More informationVLE 16-bit and 32-bit Instruction Length Decode Algorithm
Freescale Semiconductor Document Number: AN4648 Application Note Rev. 1, 3/2013 VLE 16-bit and 32-bit Instruction Length Decode Algorithm by: Pavel Bohacik 1 Introduction The Qorivva MPC56xx 32-bit microcontroller
More informationITU-T V.42bis Data Dictionary Search on the StarCore SC140/SC1400 Cores
Freescale Semiconductor Application Note AN2270 Rev. 1, 11/2004 ITU-T V.42bis Data Dictionary Search on the StarCore SC140/SC1400 Cores By Emilian Medve 1 This application note presents a StarCore SC140/SC1400
More informationCodeWarrior Development Studio for Freescale S12(X) Microcontrollers Quick Start
CodeWarrior Development Studio for Freescale S12(X) Microcontrollers Quick Start SYSTEM REQUIREMENTS Hardware Operating System Disk Space PC with 1 GHz Intel Pentum -compatible processor 512 MB of RAM
More informationUsing the Kinetis Security and Flash Protection Features
Freescale Semiconductor Document Number:AN4507 Application Note Rev. 1, 6/2012 Using the Kinetis Security and Flash Protection Features by: Melissa Hunter Automotive and Industrial Solutions Group 1 Introduction
More informationReal Time Development of MC Applications using the PC Master Software Visualization Tool. 1. Introduction. 2. Development of Motor Control.
Freescale Semiconductor Application Note AN1948 Rev. 1, 11/2005 Real Time Development of MC Applications using the PC Master Software Visualization Tool The PC Master Software Visualization Tool Simplifies
More informationWhite Paper. Freescale s Embedded Hypervisor for QorIQ P4 Series Communications Platform
White Paper Freescale s Embedded for QorIQ P4 Series Communications Platform Document Number: EMHYPQIQTP4CPWP Rev 1 10/2008 Overview Freescale Semiconductor s QorIQ communications platform P4 series processors
More information3-Phase BLDC Motor Control with Hall Sensors Using the MC56F8013
3-Phase BLDC Motor Control with Hall Sensors Using the MC56F8013 Targeting User Guide 56F8000 16-bit Hybrid Controllers 56F8013BLDCUG Rev. 1 11/2005 freescale.com TABLE OF CONTENTS About This Book Audience.............................................................
More informationUnderstanding Pressure and Pressure Measurement
Freescale Semiconductor Application Note Rev 1, 05/2005 Understanding Pressure and Pressure Measurement by: David Heeley Sensor Products Division, Phoenix, Arizona INTRODUCTION Fluid systems, pressure
More informationUsing the HC08 SCI Module
Freescale Semiconductor Application Note AN3035 Rev. 0, 09/2005 Using the HC08 SCI Module By Jorge Zambada Tinoco Oscar Luna González RTAC Americas Mexico 2005 Overview This document is intended to serve
More informationUsing the High Input Voltage Charger for Single Cell Li-Ion Batteries (KIT34671EPEVBE)
Freescale Semiconductor User s Guide Document Number: KT3467UG Rev..0, 3/008 Using the High Input Voltage Charger for Single Cell Li-Ion Batteries (KIT3467EPEVBE) Purpose This User Guide helps the Lithium-Ion
More informationMLPPP in the Evolving Radio Access Network
Freescale Semiconductor White Paper Document Number: MLPPPWP Rev. 0, 09/2010 MLPPP in the Evolving Radio Access Network by Networking and Multimedia Group Freescale Semiconductor, Inc. East Kilbride, Scotland
More informationColdFire Security SEC and Hardware Encryption Acceleration Overview
Freescale Semiconductor Application Note Document Number: AN2788 Rev. 1, 05/2008 ColdFire Security SEC and Hardware Encryption Acceleration Overview by: Melissa Hunter MSG Applications This application
More informationEmulated EEPROM Implementation in Dual Flash Architecture on MC9S08LG32 With Demo Description
Freescale Semiconductor Application Note Document Number: AN3822 Rev. 0, 2/2009 Emulated EEPROM Implementation in Dual Flash Architecture on MC9S08LG32 With Demo Description by: Saurabh Jhamb Reference
More informationA Utility for Programming Single FLASH Array HCS12 MCUs, with Minimum RAM Overhead
Freescale Semiconductor Application Note AN2720 Rev. 2, 04/2008 A Utility for Programming Single FLASH Array HCS12 MCUs, with Minimum RAM Overhead By Jim Williams 8/16-Bit Applications Engineering Austin,
More informationGenesi Pegasos II Setup
Freescale Semiconductor Application Note AN2666 Rev. 0, 07/2004 Genesi Pegasos II Setup by Maurie Ommerman CPD Applications Freescale Semiconductor, Inc. Austin, TX This application note is the first in
More informationMPXAZ6115A MPXHZ6115A SERIES. Freescale Semiconductor Technical Data. MPXAZ6115A Rev 4, 01/2007
Freescale Semiconductor Technical Data Media Resistant and High Temperature Accuracy Integrated Silicon Pressure Sensor for Measuring Absolute Pressure, On-Chip Signal Conditioned, Temperature Compensated
More informationInstalling Service Pack Updater Archive for CodeWarrior Tools (Windows and Linux) Quick Start
Installing Service Pack Updater Archive for CodeWarrior Tools (Windows and Linux) Quick Start SYSTEM REQUIREMENTS Hardware Operating System Intel Pentium 4 processor, 2 GHz or faster, Intel Xeon, Intel
More informationAvoiding Read While Write Errors When Developing In-Software Flash Programming Applications for Kinetis and ColdFire+ MCUs
Freescale Semiconductor Document Number:AN4695 Application Note Rev. 0, 04/2013 Avoiding Read While Write Errors When Developing In-Software Flash Programming Applications for Kinetis and ColdFire+ MCUs
More informationRef Parameters Symbol Conditions Min Typ Max Units. Standby 3.5 10 μa. 3 Range 50 115 kpa. 4 Resolution 0.15 kpa. 5 Accuracy -20ºC to 85ºC ±1 kpa
Freescale Semiconductor Miniature I 2 C Digital Barometer The is an absolute pressure sensor with digital output for low cost applications. A miniature 5 x 3 x 1.2 mm LGA package ideally suits it for portable
More informationDeveloping an Application for the i.mx Devices on the Linux Platform
Freescale Semiconductor Application Note Document Number: AN3870 Rev. 0, 08/2010 Developing an Application for the i.mx Devices on the Linux Platform by Multimedia Applications Division Freescale Semiconductor,
More informationComparison of MC9S08QE128 and MCF51QE128 Microcontrollers Scott Pape and Eduardo Montanez Systems Engineering, Freescale Microcontroller Division
Freescale Semiconductor White Paper Document Number: QE128COMPWP Rev. 0, 05/2007 Comparison of MC9S08QE128 and MCF51QE128 Microcontrollers by: Scott Pape and Eduardo Montanez Systems Engineering, Freescale
More informationHow To Measure Power Of A Permanent Magnet Synchronous Motor
Freescale Semiconductor Document Number:AN4680 Application Note Rev. 0, 02/2013 PMSM Electrical Parameters Measurement by: Viktor Bobek 1 Introduction The vector control, also known as the field-oriented
More informationHow to Do EEPROM Emulation Using Double Flash Array on MC9S08LC60 Ronald Gonzalez and Tatiana Orofino RTAC Americas
Freescale Semiconductor Application Note Document Number: AN3404 Rev. 1, 03/2007 How to Do EEPROM Emulation Using Double Flash Array on MC9S08LC60 by: Ronald Gonzalez and Tatiana Orofino RTAC Americas
More informationRobust Over-the-Air Firmware Updates Using Program Flash Memory Swap on Kinetis Microcontrollers
Freescale Semiconductor Document Number:AN4533 Application Note Robust Over-the-Air Firmware Updates Using Program Flash Memory Swap on Kinetis Microcontrollers by: Maclain Lobdell Automotive, Industrial,
More informationNOT RECOMMENDED FOR NEW DESIGN
Technical Data RF Power Field Effect Transistor N- Channel Enhancement- Mode Lateral MOSFET Designed for broadband commercial and industrial applications with frequencies up to 00 MHz. The high gain and
More informationHow To Fit A 2Mm Exposed Pad To A Dfn Package
EVERSPIN s New 2mm Exposed Pad DFN Package Meets Both SOIC-8 and DFN8 PCB Layouts This Application Note is to inform Everspin customers that a new, DFN8 package with a 2mm bottom exposed pad has been added
More informationHow To Improve Performance On A P4080 Processor
QorIQ Advanced Multiprocessing (AMP) Series Delivers More than Moore Freescale s new QorIQ AMP series pushes the compute and energy performance envelope beyond the P4080 processor such that its performance
More informationUser Guide. Introduction. HCS12PLLCALUG/D Rev. 0, 12/2002. HCS12 PLL Component Calculator
User Guide HCS12PLLCALUG/D Rev. 0, 12/2002 HCS12 PLL Component Calculator by Stuart Robb Applications Engineering Motorola, East Kilbride Introduction The MC9S12D amily o MCUs includes a Phase-Locked Loop
More informationConfiguring the FlexTimer for Position and Speed Measurement with an Encoder
Freescale Semiconductor Application Note Document Number: AN4381 Rev. 0, 12/2011 Configuring the FlexTimer for Position and Speed Measurement with an Encoder by: Matus Plachy System Application Engineer,
More informationMSC8156 and MSC8157 PCI Express Performance
Freescale Semiconductor Application Note Document Number: AN3935 Rev. 1, 11/2011 MSC8156 and MSC8157 PCI Express Performance This application note presents performance measurements of the MSC8156 and MSC8157
More informationQuickly Turning Ideas into Microcontroller-Based Applications with CodeWarrior Development Tools and UNIS Processor Expert
Quickly Turning Ideas into Microcontroller-Based Applications with CodeWarrior Development Tools and UNIS Processor Expert Author, Chris Joffrain, Product Manager Document Number: PROCESSXPERTWP Rev. 0
More informationi.mx28 Ethernet Performance on Linux
Freescale Semiconductor Document Number:AN4544 Application Note Rev. 0, 6/2012 i.mx28 Ethernet Performance on Linux 1 Introduction The aim of this document is to show how to measure the ENET "Ethernet
More information1 Introduction. Freescale Semiconductor Application Note. Document Number: AN3031 Rev. 1, 04/2010
Freescale Semiconductor Application Note Document Number: AN3031 Rev. 1, 04/2010 Temperature Sensor for the HCS08 Microcontroller Family by: Donnie Garcia MCD Applications, Austin, Texas Rafael Peralez
More informationNOT RECOMMENDED FOR NEW DESIGN
Technical Data RF Power Field Effect Transistor N-Channel Enhancement-Mode Lateral MOSFET Designed for broadband commercial and industrial applications with frequencies up to 00 MHz. The high gain and
More informationFreescale Semiconductor. Integrated Silicon Pressure Sensor
Freescale Semiconductor Rev 7, 1/2009 Integrated Silicon Sensor + Manifold Absolute Sensor On-Chip Signal Conditioned, Temperature Compensated and Calibrated The series Manifold Absolute (MAP) sensor for
More informationUsing the High-Input-Voltage Travel Charger for Single Cell Li-Ion Batteries (KIT34674EPEVBE)
Freescale Semiconductor User s Guide Document Number: KT34674UG Rev..0, 3/008 Using the High-Input-Voltage Travel Charger for Single Cell Li-Ion Batteries (KIT34674EPEVBE) Purpose This User Guide helps
More informationi.mx Applications Processors with Hantro's Multimedia Framework
Freescale Semiconductor White Paper IMXHANTROWP/D Rev. 2, 09/2004 i.mx Applications Processors with Hantro's Multimedia Framework By: Clint Powell, Freescale Semiconductor Inc. Marko Nurro, Hantro Products
More informationAdding SDIO Wi-Fi Solution to i.mx Windows CE 5.0/Windows CE 6.0
Freescale Semiconductor Application Note Document Number: AN3981 Rev. 0, 04/2010 Adding SDIO Wi-Fi Solution to i.mx Windows CE 5.0/Windows CE 6.0 by Multimedia Applications Division Freescale Semiconductor,
More informationDRM for Driver Information System on S12G128. Reference Design
DRM for Driver Information System on S12G128 Reference Design Document Number: DRM134 Rev. 0, 04/2012 2 Freescale Semiconductor, Inc. Contents Section Number Title Page Chapter 1 Introduction 1.1 Introduction...5
More informationGetting Started with the Student Learning Kit Featuring the Freescale HCS12 Microcontroller Application Module
Freescale Semiconductor SLKS12QSG Quick Reference Guide Rev. 0, 2/2008 Getting Started with the Student Learning Kit Featuring the Freescale HCS12 Microcontroller Application Module Freescale Semiconductor,
More informationFreescale Semiconductor, Inc. Product Brief Integrated Portable System Processor DragonBall ΤΜ
nc. Order this document by MC68328/D Microprocessor and Memory Technologies Group MC68328 MC68328V Product Brief Integrated Portable System Processor DragonBall ΤΜ As the portable consumer market grows
More informationGreen Embedded Computing and the MPC8536E PowerQUICC III Processor
White Paper Green Embedded Computing and the MPC8536E PowerQUICC III Processor Document Number: MPC8536EWP Rev 1 Introduction Growing energy demands from embedded electronics and increasing evidence of
More informationUSB to SPI Interface Evaluation Board
Freescale Semiconductor KTUSBSPIEVBSIUG User s Guide Rev. 1.0, 8/2006 USB to SPI Interface Evaluation Board (Featuring MCHC908JW32FC) The KITUSBSPIEVME Evaluation Board is a working hardware/software example
More informationPressure Freescale Semiconductor
Freescale Semiconductor Integrated Silicon Sensor On-Chip Signal Conditioned, Temperature Compensated and Calibrated The series piezoresistive transducer is a state-of-the-art monolithic silicon pressure
More informationSEMICONDUCTOR TECHNICAL DATA
SEMICONDUCTOR TECHNICAL DATA Order this document by MPX5050/D The MPX5050 series piezoresistive transducer is a state of the art monolithic silicon pressure sensor designed for a wide range of applications,
More informationKeil C51 Cross Compiler
Keil C51 Cross Compiler ANSI C Compiler Generates fast compact code for the 8051 and it s derivatives Advantages of C over Assembler Do not need to know the microcontroller instruction set Register allocation
More informationFreescale Semiconductor, I
nc. SEMICONDUCTOR APPLICATION NOTE ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 00 Order this document by AN8/D by: Eric Jacobsen and Jeff Baum Systems Engineering Group Sensor Products Division Motorola
More informationRF Power Field Effect Transistors N- Channel Enhancement- Mode Lateral MOSFETs
Technical Data RF Power Field Effect Transistors N- Channel Enhancement- Mode Lateral MOSFETs Designed for GSM and GSM EDGE base station applications with frequencies from 864 to 894 MHz. Suitable for
More informationFrequency Analysis in the Industrial Market Using Accelerometer Sensors
Freescale Semiconductor Application Note Rev 0, 07/2008 Frequency Analysis in the Industrial Market Using Accelerometer by: Kimberly Tuck FUNDAMENTALS OF VIBRATION Vibration is the mechanical oscillation
More informationSN54/74LS682 SN54/74LS684 8-BIT MAGNITUDE COMPARATORS SN54/74LS688 8-BIT MAGNITUDE COMPARATORS FAST AND LS TTL DATA 5-603
8-BIT MAGNITUDE COMPARATORS The SN54/ 74LS682, 684, 688 are 8-bit magnitude comparators. These device types are designed to perform compariso between two eight-bit binary or BCD words. All device types
More information