M68HC12 - Etlweb - Free Download PDF

1m ago
3 Views
0 Downloads
4.89 MB
478 Pages
Transcription

Freescale Semiconductor, Inc.Freescale Semiconductor, cal DataM68HC12MicrocontrollersMC912DT128A/DRev. 4, 10/2003MOTOROLA.COM/SEMICONDUCTORSFor More Information On This Product,Go to: www.freescale.com

Freescale Semiconductor, Inc.Freescale Semiconductor, Inc.For More Information On This Product,Go to: www.freescale.com

Freescale Semiconductor, Inc.Freescale Semiconductor, cal Data Rev 4.0Motorola reserves the right to make changes without further notice to any productsherein. Motorola makes no warranty, representation or guarantee regarding thesuitability of its products for any particular purpose, nor does Motorola assume anyliability arising out of the application or use of any product or circuit, and specificallydisclaims any and all liability, including without limitation consequential or incidentaldamages. "Typical" parameters which may be provided in Motorola data sheets and/orspecifications can and do vary in different applications and actual performance mayvary over time. All operating parameters, including "Typicals" must be validated foreach customer application by customer's technical experts. Motorola does not conveyany license under its patent rights nor the rights of others. Motorola products are notdesigned, intended, or authorized for use as components in systems intended forsurgical implant into the body, or other applications intended to support or sustain life,or for any other application in which the failure of the Motorola product could create asituation where personal injury or death may occur. Should Buyer purchase or useMotorola products for any such unintended or unauthorized application, Buyer shallindemnify and hold Motorola and its officers, employees, subsidiaries, affiliates, anddistributors harmless against all claims, costs, damages, and expenses, andreasonable attorney fees arising out of, directly or indirectly, any claim of personalinjury or death associated with such unintended or unauthorized use, even if such claimalleges that Motorola was negligent regarding the design or manufacture of the part.Motorola, Inc. is an Equal Opportunity/Affirmative Action Employer.Motorola andare registered trademarks of Motorola, Inc.DigitalDNA is a trademark of Motorola, Inc.MC68HC912DT128A — Rev 4.0 Motorola, Inc., 2003Technical DataMOTOROLA3For More Information On This Product,Go to: www.freescale.com

Freescale Semiconductor, Inc.Freescale Semiconductor, Inc.Technical DataMC68HC912DT128A — Rev 4.04MOTOROLAFor More Information On This Product,Go to: www.freescale.com

Freescale Semiconductor, Inc.Technical Data — MC68HC912DT128AList of ParagraphsTechnical Data — List of Paragraphs . . . . . . . . . . . . . . . . 5Freescale Semiconductor, Inc.Technical Data — Table of Contents. . . . . . . . . . . . . . . . . 7Technical Data — List of Figures . . . . . . . . . . . . . . . . . . 17Technical Data — List of Tables . . . . . . . . . . . . . . . . . . . 21Section 1. General Description . . . . . . . . . . . . . . . . . . . . 25Section 2. Central Processing Unit . . . . . . . . . . . . . . . . . 35Section 3. Pinout and Signal Descriptions . . . . . . . . . . . 41Section 4. Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67Section 5. Operating Modes. . . . . . . . . . . . . . . . . . . . . . . 79Section 6. Resource Mapping . . . . . . . . . . . . . . . . . . . . . 87Section 7. Bus Control and Input/Output . . . . . . . . . . . 103Section 8. Flash Memory . . . . . . . . . . . . . . . . . . . . . . . . 115Section 9. EEPROM Memory . . . . . . . . . . . . . . . . . . . . . 123Section 10. Resets and Interrupts . . . . . . . . . . . . . . . . . 137Section 11. I/O Ports with Key Wake-up . . . . . . . . . . . . 149Section 12. Clock Functions . . . . . . . . . . . . . . . . . . . . . 157Section 13. Oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . 193Section 14. Pulse Width Modulator . . . . . . . . . . . . . . . . 225Section 15. Enhanced Capture Timer . . . . . . . . . . . . . . 241Section 16. Multiple Serial Interface . . . . . . . . . . . . . . . 277MC68HC912DT128A — Rev 4.0MOTOROLATechnical DataList of ParagraphsFor More Information On This Product,Go to: www.freescale.com5

Freescale Semiconductor, Inc.List of ParagraphsSection 17. Inter IC Bus . . . . . . . . . . . . . . . . . . . . . . . . . 301Section 18. MSCAN Controller . . . . . . . . . . . . . . . . . . . . 325Section 19. Analog-to-Digital Converter . . . . . . . . . . . . 367Section 20. Development Support. . . . . . . . . . . . . . . . . 395Section 21. Electrical Specifications. . . . . . . . . . . . . . . 421Freescale Semiconductor, Inc.Section 22. Appendix: Changes fromMC68HC912DG128 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441Section 23. Appendix: CGM Practical Aspects . . . . . . 447Section 24. Appendix: Information onMC68HC912DT128A Mask Set Changes . . . . . . . . . . . . 457Technical Data — Glossary . . . . . . . . . . . . . . . . . . . . . . 461Technical Data — Revision History . . . . . . . . . . . . . . . . 473Technical Data6MC68HC912DT128A — Rev 4.0List of ParagraphsFor More Information On This Product,Go to: www.freescale.comMOTOROLA

Freescale Semiconductor, Inc.Technical Data — MC68HC912DT128ATable of ContentsList of ParagraphsFreescale Semiconductor, Inc.Table of ContentsList of FiguresList of TablesSection 1. General Description1.1Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .251.2Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251.3Devices Covered in this Document. . . . . . . . . . . . . . . . . . . . . .261.4Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261.5MC68HC912DT128A Block Diagram . . . . . . . . . . . . . . . . . . . . 301.6MC68HC912DG128A Block Diagram. . . . . . . . . . . . . . . . . . . . 311.7Ordering Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Section 2. Central Processing Unit2.1Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .352.2Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352.3Programming Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362.4Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372.5Addressing Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .382.6Indexed Addressing Modes . . . . . . . . . . . . . . . . . . . . . . . . . . .39MC68HC912DT128A — Rev 4.0Technical DataMOTOROLATable of ContentsFor More Information On This Product,Go to: www.freescale.com7

Freescale Semiconductor, Inc.Table of Contents2.7Opcodes and Operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Freescale Semiconductor, Inc.Section 3. Pinout and Signal Descriptions3.1Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .413.2MC68HC912DT128A Pin Assignments in 112-pin QFP. . . . . . 413.3Power Supply Pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .453.4Signal Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473.5Port Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56Section 4. Registers4.1Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .674.2Register Block. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67Section 5. Operating Modes5.1Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .795.2Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795.3Operating Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795.4Background Debug Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .84Section 6. Resource MappingTechnical Data86.1Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .876.2Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 876.3Internal Resource Mapping. . . . . . . . . . . . . . . . . . . . . . . . . . . .876.4Flash EEPROM mapping through internal Memory Expansion 926.5Miscellaneous System Control Register . . . . . . . . . . . . . . . . . . 966.6Mapping test registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .996.7Memory Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100MC68HC912DT128A — Rev 4.0Table of ContentsFor More Information On This Product,Go to: www.freescale.comMOTOROLA

Freescale Semiconductor, Inc.Table of ContentsSection 7. Bus Control and Input/Output7.1Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1037.2Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1037.3Detecting Access Type from External Signals . . . . . . . . . . . .1037.4Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .104Freescale Semiconductor, Inc.Section 8. Flash Memory8.1Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1158.2Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1158.3Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1168.4Flash EEPROM Control Block . . . . . . . . . . . . . . . . . . . . . . . .1168.5Flash EEPROM Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1168.6Flash EEPROM Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . 1178.7Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1198.8Programming the Flash EEPROM . . . . . . . . . . . . . . . . . . . . . 1208.9Erasing the Flash EEPROM . . . . . . . . . . . . . . . . . . . . . . . . . . 1218.10Stop or Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1218.11Flash protection bit FPOPEN . . . . . . . . . . . . . . . . . . . . . . . . .122Section 9. EEPROM Memory9.1Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1239.2Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1239.3EEPROM Selective Write More Zeros . . . . . . . . . . . . . . . . . .1249.4EEPROM Programmer’s Model . . . . . . . . . . . . . . . . . . . . . . .1259.5EEPROM Control Registers . . . . . . . . . . . . . . . . . . . . . . . . . . 1269.6Program/Erase Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . .1339.7Shadow Word Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134MC68HC912DT128A — Rev 4.0Technical DataMOTOROLATable of ContentsFor More Information On This Product,Go to: www.freescale.com9

Freescale Semiconductor, Inc.Table of Contents9.8Programming EEDIVH and EEDIVL Registers. . . . . . . . . . . . 135Freescale Semiconductor, Inc.Section 10. Resets and Interrupts10.1Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13710.2Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13710.3Exception Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13810.4Maskable interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13810.5Latching of Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13910.6Interrupt Control and Priority Registers . . . . . . . . . . . . . . . . .14110.7Interrupt test registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14210.8Resets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14310.9Effects of Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14510.10 Register Stacking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147Section 11. I/O Ports with Key Wake-up11.1Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14911.2Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14911.3Key Wake-up and port Registers . . . . . . . . . . . . . . . . . . . . . . 15011.4Key Wake-Up Input Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154Section 12. Clock FunctionsTechnical Data1012.1Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15712.2Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15712.3Clock Sources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15812.4Phase-Locked Loop (PLL) . . . . . . . . . . . . . . . . . . . . . . . . . . . 15912.5Acquisition and Tracking Modes. . . . . . . . . . . . . . . . . . . . . . .16112.6Limp-Home and Fast STOP Recovery modes . . . . . . . . . . . . 163MC68HC912DT128A — Rev 4.0Table of ContentsFor More Information On This Product,Go to: www.freescale.comMOTOROLA

Freescale Semiconductor, Inc.Table of Contents12.7System Clock Frequency Formulae . . . . . . . . . . . . . . . . . . . . 18112.8Clock Divider Chains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18212.9Computer Operating Properly (COP) . . . . . . . . . . . . . . . . . . .18512.10 Real-Time Interrupt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18612.11 Clock Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .186Freescale Semiconductor, Inc.12.12 Clock Function Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187Section 13. Oscillator13.1Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19313.2Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19313.3MC68HC912DT128A Oscillator Specification . . . . . . . . . . . .19413.4MC68HC912Dx128C Colpitts Oscillator Specification . . . . . . 19713.5MC68HC912Dx128P Pierce Oscillator Specification . . . . . . . 212Section 14. Pulse Width Modulator14.1Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22514.2Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22514.3PWM Register Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . .22914.4PWM Boundary Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .240Section 15. Enhanced Capture Timer15.1Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24115.2Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24115.3Enhanced Capture Timer Modes of Operation . . . . . . . . . . . . 24715.4Timer Register Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . 25115.5Timer and Modulus Counter Operation in Different Modes . . 275Section 16. Multiple Serial InterfaceMC68HC912DT128A — Rev 4.0MOTOROLATechnical DataTable of ContentsFor More Information On This Product,Go to: www.freescale.com11

Freescale Semiconductor, Inc.Freescale Semiconductor, Inc.Table of Contents16.1Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27716.2Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27716.3Block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27816.4Serial Communication Interface (SCI) . . . . . . . . . . . . . . . . . .27816.5Serial Peripheral Interface (SPI) . . . . . . . . . . . . . . . . . . . . . . .28916.6Port S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299Section 17. Inter IC Bus17.1Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30117.2Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30117.3IIC Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30217.4IIC System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30417.5IIC Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30417.6IIC Register Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30917.7IIC Programming Examples . . . . . . . . . . . . . . . . . . . . . . . . . .318Section 18. MSCAN Controller18.1Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32518.2Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32518.3External Pins. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32618.4Message Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32718.5Identifier Acceptance Filter . . . . . . . . . . . . . . . . . . . . . . . . . . .33218.6Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33518.7Protocol Violation Protection. . . . . . . . . . . . . . . . . . . . . . . . . . 33718.8Low Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33818.9Timer Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34218.10 Clock System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .343Technical Data12MC68HC912DT128A — Rev 4.0Table of ContentsFor More Information On This Product,Go to: www.freescale.comMOTOROLA

Freescale Semiconductor, Inc.Table of Contents18.11 Memory Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34518.12 Programmer’s Model of Message Storage . . . . . . . . . . . . . . .34618.13 Programmer’s Model of Control Registers . . . . . . . . . . . . . . . 351Freescale Semiconductor, Inc.Section 19. Analog-to-Digital Converter19.1Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36719.2Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36719.3Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36919.4Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37019.5ATD Operational Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37219.6ATD Operation In Different MCU Modes . . . . . . . . . . . . . . . . 37319.7General Purpose Digital Input Port Operation . . . . . . . . . . . .37519.8Application Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . .37619.9ATD Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376Section 20. Development Support20.1Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39520.2Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39520.3Instruction Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39520.4Background Debug Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . .39720.5Breakpoints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41220.6Instruction Tagging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419Section 21. Electrical Specifications21.1Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42121.2Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42121.3Tables of Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422MC68HC912DT128A — Rev 4.0MOTOROLATechnical DataTable of ContentsFor More Information On This Product,Go to: www.f

MC912DT128A/D Rev. 4, 10/2003 MC68HC912DT128A MC68HC912DG128A Technical Data MC68HC912DT128C MC68HC912DG128C MC68HC912DT128P MC68HC912DG128P. MC68HC912DT128A — Rev 4.0 Technical Data MOTOROLA 3 MC68HC912DT128A MC68HC912DG128A MC68HC912DT128C MC68HC912DG128C MC68HC912DT128P MC68HC912DG128P Technical Data Rev 4.0