MC9S12XEP100开发板实验指导手册

合集下载

VLG-MC9S12ZVC快速入门指南说明书

VLG-MC9S12ZVC快速入门指南说明书

VLG-MC9S12ZVCQuick Start Guide S12 MagniV Mixed-signal MCUs S12ZVC Evaluation BoardIntroduction and default settingsQuick Start Guide2This guide shows how to quickly connect the board to a host PC andexecute a demonstration application preloaded in to the flash memory.The S12ZVC MCU integrates:• S12Z CPU• Power supplyPNP external ballast transistor for VDDX, VDDA, and VDDCLED power indicators• Reset• LEDs• Buzzer• ADC potentiometer• Keyboard matrix• High-voltage input• Sensors Temperature and humidity Pressure sensor Inertial sensor SPI X-Y axis • SENT • CAN • LIN Default jumper positions of the VLG-S12ZVC board are shown in the following section./S12MagniVDevice overview S12ZVC familyThe MC9S12ZVC family is a new member of the S12 MagniV product line integrating a battery level (12 V) voltage regulator, supply voltage monitoring, high voltage inputs, and a CAN physical interface. It’s primarily targeting at CAN nodes like sensors, switch panels, or small actuators. It offers various low-power modes and wake-up management to address state of the art power consumption requirements.Some members of the MC9S12ZVC family are also offered for high temperature applications requiring AEC-Q100 Grade 0 (-40°C to +150°C ambient operating temperature range) The MC9S12ZVC family is based on the enhanced performance, linear address space S12Z core and delivers an optimized solution with the integration of several key system components into a single device, optimizing system architecture and achieving significant space savings.34Jumper default configuration This section describes about the jumper configuration.Quick Start GuideBlock Diagram shows the maximum configuration. Not all pins or all peripherals are available on all devices and packages. Rerouting options are not shown.S12ZVC architecture CAN-PHYMS-CAN2 x SCI2 SPI1 L1CSENT4 ch LSD (+25mA)open drain1ch HSD (+20mA)open drain EEPROM with ECC up to 2 K bytes)2-HVI Pierce Oscillator Up to 192 KB Flash (ECC)S12ZCPU 32 MHz Bus (25 MHZ @ >150°C Tj)RAM with ECC up to 8 K bytes V-SUP Voltage Supply Monitor PWM 4ch 16-bit TIMER 4ch 16-bit Real Time Interrupt BDM/BDC Hi-Res-PWM 4ch 16-bit Hi-Res-Timer 4ch 16-bit Vreg for CAN PHY with ext. ballast (BCTLC)Internal RC Oscillator,+/- 1.3%PLL with Frequency Modulation option Temp Sense 12-bit Analog-Digital Converter 8-Bit DAC Analog Comparator Figure 1. S12ZVC architecture diagram15/S12MagniVFigure 2. Jumper configuration diagramPRIMARY SIDEQuick Start GuideJumper default configurationThe following table lists the jumper default configuration.6/S12MagniVSoftware tools installationThis section describes how to get started with the S12ZVC board by installing CodeWarrior development studio and testing the demo program that comes programmed with the board.7Software tools installation (cont.) Quick Start Guide2Launch thedemo programThe S12ZVC EVB board comes preprogrammed with a small demonstration application that exercises the different modules of the S12ZVC MCU family, including the ADC, SCI, I2C, and GPIO modules.To see this demonstration:• Connect a 12 V power source to the EVB.• Connect a USB cable to the USB type B connector.• Press the keys on the keypad to hear tones on the buzzer.• Tilt the EVB to observe changes on the red and green LEDs.• Rotate the potentiometer toobserve changes on the orange LED.• Notice that the pressure sensor controls the yellow LED.The software for this application is available on .8/S12MagniV Jumper list and description9Quick Start GuideJumper list and description (cont.)10/S12MagniV Jumper list and description (cont.)11Quick Start GuideJumper list and description (cont.)12/S12MagniV Jumper list and description (cont.)13Quick Start GuideHeaders and connectors listThe following table lists all of the connectors available in the S12ZVC evaluation board and their corresponding signals.14/S12MagniV Headers and connectors list (cont.)15Peripheral listQuick Start GuideThe following table lists all the peripherals available in the S12ZVC evaluation board. Peripheral ID MCU PORT DescriptionPotentiometer R76PAD8Potentiometer connected toADC channel 8LED – Voltage Indicator D7–VSUP LED indicator D10–VDDX LED indicator D14–VDDA LED indicator D16–VDDC LED indicatorSwitch Panel SW4–Matrix keyboard switch SW5–SW6–SW7–SW8–SW9–SW10–SW11–SW12–16Peripheral list (cont.)/S12MagniV Peripheral ID MCU PORT DescriptionHigh Voltage Switch SW1PL1Switch connected to PL1(with 10 kΩ resistor)SW2PL0Switch connected to PL0(with 10 kΩ resistor)Buzzer LS1PP7Buzzer controlled by PP7LED – General purpose D4PP6Red LED connected to port PP6D6PP5Green LED connected to port PP5 D13PP4Yellow LED connected to port PP4 D15PP0Orange LED connected to port PP0Reset SW3–Reset switch17ReferencesFor further reference, the following documents are available at .• AN4851: Using the High Resolution Timer and PWM in the S12ZVC (AN4851)• AN4852: Using the SENT Transmitter Module in S12ZVC Devices (AN4852)Revision historyRevision number Date Substantial changes 001/2014Initial releaseInformation in this document is provided solely to enable system and software implementers to use Freescale products. There are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits based on the information in this document. Freescale reserves the right to make changes without further notice to any products herein. Freescale makes no warranty, representation, or guarantee regarding the suitability of its products for any particular purpose, nor does Freescale 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 that may be providedin Freescale 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 does not convey any license under its patent rights nor the rights of others. Freescale sells products pursuantto standard terms and conditions of sale, which can be found at the following address: /SalesT ermsandConditions.SupportVisit /support for a list ofphone numbers within your region.WarrantyVisit /warranty for completewarranty information.For more information, visit Freescale, the Freescale logo, and CodeWarrior are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. MagniV is a trademark of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2015 Freescale Semiconductor, Inc. Doc Number: S12ZVCEBQSG REV 0 Agile Number: 926-28038 Rev AVLG-MC9S12ZVC。

重庆大学单片机(S12X)课程实验内容与指导-2013版

重庆大学单片机(S12X)课程实验内容与指导-2013版

单片机(S12X)课程实验内容与指导实验参考:1、教材第4章“仿真、调试与C语言编程”,以及相关章节。

2、教材第14章“S12XS128开发平台的DIY设计与使用”。

3、文档附件:CQU-S12X核心板/扩展板简要说明、完全原理图PDF。

4、资源下载:/注意事项:1、教学实验核心开发板上MCU型号为MC9S12XS128MAL,16Mhz 外部晶振。

2、在做硬件下载调试实验时,需要连接仿真器TBDML,此时仿真器兼做电路板供电,应将仿真器的USB接口端连接在电脑背后以防供电电流不足。

3、硬件实验时要确保开发板上的外设部件已通过跳线帽跳接到MCU相关引脚,并且没有与其它外设部件冲突。

4、*号题为选做、提高内容。

实验一编程入门、仿真调试实验目的:熟悉飞思卡尔MCU仿真与调试环境的使用方法,掌握汇编语言程序的编辑书写规范,学习单片机汇编语言程序调试手段,进一步编制应用程序,体会MCU应用程序特点。

实验环境:CodeWarrior IDE仿真调试软件;编程语言选择:单选汇编语言(Relocatable Assembly);调试连接选择:全软件仿真(Full Chip Simulation);实验内容:1、编辑、编译简单样本程序:两个4字节无符号数相加。

熟悉CodeWarrior IDE 的工程建立、菜单、工具、窗口、状态等。

a. 已知:($2000)=被加数开始,($2004)=加数开始;具体值在单步运行开始前预先在Debug窗口的Memory区通过手工设定。

b. 仿真调试:分别利用单步、全速、停止、断点、复位等运行调试手段,观察寄存器A、B、X、Y、PC、CCR等的状态与变化,以及观察FALSH中指令地址和RAM中数据变化情况,验证运行结果。

(该仿真调试方法将运用于以后的各次实验中)样本程序代码参考如下:重点编辑Entry后面的代码,其它已在工程建立时自动完成,保留前面的宏定义代码,与自己任务无关的其它代码可以删除。

Freescale 16-bit MC9S12HY64 自动汽车仪表盘演示板用户指南说明书

Freescale 16-bit MC9S12HY64 自动汽车仪表盘演示板用户指南说明书

Freescale Semiconductor Users GuideDocument Number:S12HY64ACDUGRev. 2, 12/2009 Contents1Demonstration BoardHardwareThe dashboard is developed with Freescale’s low cost 16-bit microcontroller the MC9S12HY, which is responsible for driving all the board functionality. The hardware comes complete with four motors that are shaft-illuminated (providing an aesthetic back-light for the needle pointers), a160-segment LCD display, molex CAN and LIN connections, a piezoelectric speaker to demonstrate sound capability, and a series of switches and LEDs to emulate standard dashboard functionality.1Demonstration Board Hardware . . . . . . . . . . . . . . . . . . . 1 2How to Set Up and Operate the Demo . . . . . . . . . . . . . . 2 3FAQs and Talking Points. . . . . . . . . . . . . . . . . . . . . . . . . 4 4Additional Resources and Materials . . . . . . . . . . . . . . . . 5MC9S12HY64 Automotive Cluster Demo Users Guideby:Steven McLaughlinApplications EngineerMicrocontroller Solutions Group, ScotlandHow to Set Up and Operate the DemoFigure1. MC9S12HY Dashboard Cluster Demo Board2How to Set Up and Operate the DemoThe demo is very straightforward to set up. It requires a 12 V DC supply, which is connected at the bottom right-hand side of the board, as shown in Figure1. Switch three should be set to the on position. (This demo does not use switch two, the ignition switch, so it can be in any state.) The demo will then start automatically in the initialization phase (described below) and all motors will return to zero all at once.How to Set Up and Operate the DemoFigure 2. Flow Diagram (With Pictures) of Demo OperationPower upInitialization phase:LCD displaysMotors return tozero position“S12HY”Buttons can initiate indicator LED, scroll to trip A/B screens,enter hazard mode — Potentiometer adjusts sound All modules moveat different speedsin clockwise andcounter-clockwisedirection and the LCDupdates varioussegmentsvolumeFAQs and Talking PointsBesides driving the motors and LCD, the demo incorporates some software solutions that enhance functionality.1.Pressing switch 5 activates a horn sound and pressing switch 4 toggles the cruise control on and off.2.Pressing the menu switch allows the user to scroll through the odometer, trip A meter, and trip Bmeter. This is indicated clearly on the LCD, and the user will also see the digits change.3.By pressing switch 4 and 5 simultaneously, the demo will enter hazard mode, shut down theoperation, enable an alarm sound, and begin to flash and display “hazard” on the LCD. Release the switches to return the demo to normal operation.4.The piezoelectric speaker plays a continuous indicator relay clicking sound. Turning thepotentiometer varies the amplitude of the PWM signal that is fed to the piezoelectric speaker. Further incorporated into this demo are two significant software solutions. First, it should be noted that the MC9S12HY does not contain a hardware stepper stall detect module (SSD), which means that the motor cannot detect the zero position and cannot determine when the end of travel has been reached. But this demo is capable of both — an integrated driver capable of performing stall detect with microstepping is used to enhance the motor functionality for these purposes.Second, the user will notice that the odometer value displayed on the LCD is maintained even after powering the demo off and then back on, despite the MC9S12HY device having no EEPROM. The demo uses an emulated EEPROM software driver, available for free on the Freescale website, which uses the device’s D-flash to read and write the odometer values.3FAQs and Talking Points1.Is the SSD software available for general use?—An application note, AN4024 has been released explaining the SSD software technique and is available with demo software.2.Only the odometer value is restored at POR — why aren’t the other values restored?—This application is for demonstration purposes, so only the odometer value has been programmed with the EEE driver. In a production application other values, such as the trip A/Bmeter, can be implemented in the same way.3.How are the shaft pointers illuminated?—Each motor includes an integrated white LED which is connected directly to a GPIO. (It should be pointed out that these require one GPIO each.) Shafts are illuminated by controlling theGPIO in a manner normally used for initiating LEDs.4.What is Jellyfish?—This is the internal code name for this device, which is why a jellyfish symbol and the word “Jellyfish” appear on the LCD screen.5.There are a number of other components that do not seem to be used, as well as somenon-populated components. What are they?—The non-populated components are for the 32-bit MPC5606S device. This board was built witha footprint for both MPC5606S (found on the underside of the board) and MC9S12HY. This isAdditional Resources and Materials why some LEDs and potentiometers do not operate with this demo: the MC9S12HY does notsupport them.6.The demo board contains a CAN and LIN molex connector. Do these work?—Yes, but they have not been enabled on this demo.7.Where can I find the schematics of the demo, and is there demo code available?—Axiom will provide a CD with both schematics and software when you purchase the board. The firmware for this demo is not openly available.8.Is it possible to have a backlit LCD?—It is not included on this demo, but it is possible. However, it may be difficult to implement if the LCD has already been soldered to the board. The backlight requires a 5 V DC power supplyand a GPIO has been made available on this demo for this purpose.9. I see a connection for auxiliary motors on the left-hand side of the board — what is it for?—This connector allows the connection of additional motors, but is not available for the MC9S12HY (which can drive a maximum of only four motors). It is for the MPC5606S only.10.If I don’t like the piezoelectric speaker sound, can I change it?—Yes. This is a PWM signal being fed via an amplifier, and it is possible to alter it.4Additional Resources and MaterialsApplication notes available at :•Application note titled Introduction to the Stepper Stall Detector Module (document AN3330).•Application note titled Comparison of the S12XS CRG Module with S12P CPMU Module (document AN3622) gives an explanation of the CPMU clock module.•Application note titled High Speed Stall Dtection on the S12HY Family (document AN4024).•Application note titled MC9S12HY Family Demonstration Lab Training (document AN4021). Application video:• A video tutorial demostrating the S12HY driving motors and LCD is available at S12HY Product Summary Page.Useful websites:•/?q=node/353 — contains software examples, VID motor documentation, and LCD glass documentation.•/?q=node/366 — contains schematics•/16bit — EEE driver software.Document Number: S12HY64ACDUGRev. 212/2009How to Reach Us:Home Page:Web Support:/supportUSA/Europe or Locations Not Listed:Freescale Semiconductor, Inc.Technical Information Center, EL5162100 East Elliot Road Tempe, Arizona 85284+1-800-521-6274 or +/supportEurope, Middle East, and Africa:Freescale Halbleiter Deutschland GmbH T echnical Information CenterSchatzbogen 781829 Muenchen, Germany +44 1296 380 456 (English)+46 8 52200080 (English)+49 89 92103 559 (German)+33 1 69 35 48 48 (French)/supportJapan:Freescale Semiconductor Japan Ltd.Headquarters ARCO T ower 15F1-8-1, Shimo-Meguro, Meguro-ku,T okyo 153-0064Japan 0120 191014 or +81 3 5437 9125***************************Asia/Pacific:Freescale Semiconductor China Ltd.Exchange Building 23F No. 118 Jianguo Road Chaoyang District Beijing 100022 China +86 10 5879 8000**************************For Literature Requests Only:Freescale Semiconductor Literature Distribution Center 1-800-441-2447 or 303-675-2140Fax: 303-675-2150*********************************************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 licenses 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 that 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. RoHS-compliant and/or Pb-free versions of Freescale products have the functionality and electrical characteristics as their non-RoHS-compliant and/or non-Pb-free counterparts. For further information, see or contact your Freescale sales representative.For information on Freescale’s Environmental Products program, go to /epp .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. 2009. All rights reserved.。

飞思卡尔16位MCUMC9S12P-系列参考手册

飞思卡尔16位MCUMC9S12P-系列参考手册

飞思卡尔16位MCUMC9S12P-系列参考手册飞思卡尔16位MCU MC9S12P-系列参考手册详情请下载: 16位MC9S12P-Family.pdfThe MC9S12P family is an optimized, automotive, 16-bit microcontroller product line focused on lowcost,high-performance, and low pin-count. This family is intended to bridge between high-end 8-bit microcontrollers and high-performance 16-bit microcontrollers, such as the MC9S12XS family. The MC9S12P family is targeted at generic automotive applications requiring CAN or LIN/J2602 communication. Typical examples of these applications include body controllers, occupant detection, door modules, seat controllers, RKE receivers, smart actuators, lighting modules, and smart junction boxes.The MC9S12P family uses many of the same features found on the MC9S12XS family, including errorcorrection code (ECC) on flash memory, a separate data-flash module for diagnostic or data storage, a fastanalog-to-digital converter (ATD) and a frequency modulated phase locked loop (IPLL) that improves theEMC performance.The MC9S12P family deliver all the advantages and efficiencies of a 16-bit MCU while retaining the lowcost, power consumption, EMC, and code-size efficiency advantages currently enjoyed by users of Freescale’s existing 8-bit and 16-bit MCU families. Like the MC9S12XS family, the MC9S12P family run 16-bit wide accesses without wait states for all peripherals and memories. The MC9S12P family is available in 80-pin QFP, 64-pin LQFP, and 48-pin QFN package options and aims to maximize pin compatibility with the MC9S12XS family. Inaddition to the I/O ports available in each module, further I/O ports are available with interrupt capability allowing wake-up from stop or wait modes.。

编程器P800-ISP【使用手册】MC9S12XEP系列芯片在线烧录指南

编程器P800-ISP【使用手册】MC9S12XEP系列芯片在线烧录指南

产品应用笔记
©2016 Guangzhou ZHIYUAN Electronics Stock Co., Ltd. 1
广州致远电子股份有限公司
P800 烧写指南
MC9S12XEP 系列芯片在线烧写指南
2. 工程新建
如下图,为 P800 的面板,点击创建开始 P800 工程的新建。
2.1 创建
图 2.0 P800 顶层面板
3.10 量产配置................................................................................................................. 11
3.11 缓冲区.....................................................................................................................12
2.1
创建........................................................................................................................... 2
2.2
芯片选择 ................................................................................................................... 3
1. 适用范围...................................................................................................................1

Freescale MC9S12G128微控制器的TWR-S12G128演示板用户指南说明书

Freescale MC9S12G128微控制器的TWR-S12G128演示板用户指南说明书

D O C -0508-010, RE V AWeb Site: TWR-S12G128Demonstration Board for Freescale MC9S12G128MicrocontrollerUSER GUIDECONTENTSCAUTIONARY NOTES (4)TERMINOLOGY (4)FEATURES (5)MEMORY MAP (6)SOFTWARE DEVELOPMENT (7)DEVELOPMENT SUPPORT (7)OSBDM BOOTLOADER (8)BDM_PORT HEADER (8)POWER (8)POWER SELECT (9)RESET SWITCH (9)LOW VOLTAGE RESET (9)TIMING (10)COMMUNICATIONS (10)RS-232 (10)COM CONNECTCOR (11)COM_EN (11)LIN PORT (11)LIN ENABLE (12)LIN COM INPUT (12)LIN_PWR OPTION (12)MSTR OPTION (12)LIN-J1 CONNECTOR (13)CAN PORT (13)CAN TERMINATION ENABLE (14)STANDBY MODE (14)USER PERIPHERALS (14)POTENTIOMETER (14)USER LED’S (15)PUSHBUTTON SWITCHES (15)EDGE CONNECTOR PINOUT (16)FIGURESFigure 1: Memory Map (6)Figure 2: BDM_PORT Header (8)Figure 3: PWR_SEL Option Header (9)Figure 4: Serial Connections (10)Figure 5: COM1 Connector (11)Figure 6: COM_EN Option Header (11)Figure 7: LIN Block Diagram (11)Figure 8: JP6 Option Header (13)Figure 9: LIN Connector (13)Figure 10: CAN_PORT (13)Figure 11: CAN Termination Enable (14)Figure 12: JP1 Option Header (15)Figure 13: Primary Edge Connector (16)Figure 14: Secondary Edge Connector (18)REVISIONDate Rev CommentsCAUTIONARY NOTES1) Electrostatic Discharge (ESD) prevention measures should be used when handling thisproduct. ESD damage is not a warranty repair item.2) Axiom Manufacturing does not assume any liability arising out of the application or use ofany product or circuit described herein; neither does it convey any license under patent rights or the rights of others.3) EMC Information on the TWR-S12G128 board:a) This product as shipped from the factory with associated power supplies and cables,has been verified to meet with requirements of CE and the FCC as a CLASS A product.b) This product is designed and intended for use as a development platform for hardwareor software in an educational or professional laboratory.c) In a domestic environment, this product may cause radio interference in which case theuser may be required to take adequate prevention measures.d) Attaching additional wiring to this product or modifying the products operation from thefactory default as shipped may effect its performance and cause interference with nearby electronic equipment. If such interference is detected, suitable mitigating measures should be taken.TERMINOLOGYThis development module utilizes option select jumpers to configure default board operation. Terminology for application of the option jumpers is as follows:Jumper – a plastic shunt that connects 2 terminals electricallyJumper on, in, or installed = jumper is a plastic shunt that fits across 2 pins and the shunt is installed so that the 2 pins are connected with the shunt.Jumper off, out, or idle = jumper or shunt is installed so that only 1 pin holds the shunt, no 2 pins are connected, or jumper is removed. It is recommended that the jumpers be placed idle by installing on 1 pin so they will not be lost.Cut-Trace – a circuit trace connection between component pads. The circuit trace may be cut using a knife to break the default connection. To reconnect the circuit, simply install a suitably sized 0-ohm resistor or attach a wire across the pads.Signal names followed by an asterisk (*) denote active-low signals.FEATURESThe TWR-S12G128 is a demonstration board for the MC9S12G128 microcontroller; an automotive, 16-bit microcontroller focused on low-cost, high-performance in a low pin-count device. The MC9S12G128 provides16-bit wide accesses, without wait states, for all peripherals and memories. The MC9S12G128 targets automotive applications requiring CAN or LIN/J2602 communications. Examples include body controllers, occupant detection, etc… The board is designed to interface to the Freescale Tower System, a modular development platform which aids in rapid prototyping and tool-reuse. An integrated Open-Source BDM, software tools, and examples provided with the development board make application development and debug quick and easy. All MCU signals are available on one or both edge connectors.∙MC9S12G128, 100 LQFP∙128K Bytes Flash∙4096 Bytes EEPROM∙8192 Bytes RAM∙25MHz Bus Frequency∙Internal Oscillator∙SCI, SPI, MSCAN∙Integrated Open Source BDM (OSBDM)∙BDM_PORT header for external BDM cable support∙ 1 ea. High-Speed CAN Physical Layer Transceiver∙ 1 ea, Enhanced LIN Physical Layer Transceiver∙RS-232 Serial Data Physical Layer Transceiver∙On-board +5V regulator∙Power input from OSBDM, Tower System, or inputvias at E1/E2∙Power Input Selection Jumpers∙Power input from USB-BDM∙Power input from on-board regulator∙Power input from Tower System edge connector∙User Peripherals∙ 4 User Push Button Switches∙ 4 User LED Indicators∙5K ohm POT w /LP Filter∙User Option Jumpers to disconnect Peripherals∙Connectors∙BDM_PORT Connector for External BDM Cable∙USB mini-AB Connector∙2x5, 0.1” ctr, RS-232 Header∙1x4, 4.2mm, Molex CAN Cable Connector∙2x2, 4.2mm, Molex LIN Cable ConnectorSpecifications:Board Size 3.55” x 3.20” overallPower Input: +5V from USB connector or from Tower SystemNOTE: LIN functionality requires +12V on LIN +V input or +12V at E1/E2 input.MEMORY MAPFigure 1 below shows the target device memory map. Refer to the MC9S12G128 Reference Manual (RM) for further information.Figure 1: Memory Map0x000E–0x000F Reserved 20x0010–0x0017 MMC (memory map control)80x0018–0x0019 Reserved20x001A–0x001B Device ID register20x001C–0x001F PIM (port integration module)40x0020–0x002F DBG (debug module)160x0030–0x0033 Reserved40x0034–0x003F CPMU (clock and power management)120x0040–0x006F TIM0 (timer module)480x0070–0x009F ATD (analog-to-digital converter, 10 bit, 8-channel)48SOFTWARE DEVELOPMENTSoftware development requires the use of a compiler or an assembler supporting the HCS12(X) instruction set and a host PC running a debug interface. CodeWarrior Development Studio is supplied with this board for application development and debug. Refer to the supporting CodeWarrior documentation for details on use and capabilities.DEVELOPMENT SUPPORTApplication development and debug for the target TWR-S12 board is supported through the Open-Source Background Debug Mode (OSBDM) interface or an external BDM interface connector. The OSBDM is fully supported in CodeWarrior and provides direct, non-intrusive access to the target device internals. While in BDM mode, no internal resources are used. Code stepping and break-points are fully supported.Connection between a host PC and the target device is provided via a mini-B, USB connector. The OSBDM is capable of providing power to the target board eliminating the need for external power. Please note that power supplied by the OSBDM is limited by the USB specification. When powered through the OSBDM, total current draw, including the OSBDM, TWR-S12 board, and Tower System must remain less that 500mA. Otherwise, the USB bus will cause the host PC to disconnect the board. Damage to the host PC, target board, or Tower System may result if this current limit is violated.OSBDM BootloaderThe OSBDM is pre-programmed with a bootloader application to allow field updates. The USB bootloader communicates with a GUI application running on a host PC. The GUI application allows the user to update OSBDM firmware easily and quickly. Option jumper JP401 enables the bootloader at startup. This option header is not populated in default configuration. Refer to Freescale Application Note AN3561 for details on using the GUI application and bootloader. The application note may be found at or at /support. BDM_PORT HeaderA compatible HCS12 BDM cable can also be attached to the 6-pin BDM interface header at J3. This header allows the use of external programming/debug cables. Refer to the external programming/debug cable documentation for details on use. The figure below shows the pin-out for the DEBUG header.Figure 2: BDM_PORT HeaderJ4001 2 GND See the associated RM for complete DEBUGdocumentation3 4 RESET*5 6 VDDNOTE: This header is not installed in default configuration.POWERThe TWR-S12 board may be powered from the OSBDM, from the Tower System, from the LIN +V input, or 2 input vias at E1 & E2. The LIN +V input accepts +12V from the LIN bus and uses an on-board regulator to create the board operating voltage. Input vias at E1 & E2 allowconnecting external power to the board if desired. An on-board regulator is used to create the board operating voltage from this input.Use of the on-board regulator requires input voltage between +7.V and +27V. However, input voltage should be kept as low as possible to reduce device self-heating.Power SelectOption headers PWR_SEL selects the input power source for the target board. When powered from the Tower System, the OSBDM voltage output is disabled.Figure 3: PWR_SEL Option HeaderJP5 1●●2Select TWR voltage inputPWR_SEL ●●Select OSBDM voltage input (default)●●Select on-board regulator inputRESET SWITCHThe RESET switch applies an asynchronous RESET input to the MCU. The RESET switch is connected directly to the RESET* input on the MCU. Pressing the RESET switch applies a low voltage level to the RESET* input. A pull-up bias resistor allows normal MCU operation. LOW VOLTAGE RESETThe MC9S12G128 applies a Power-On Reset (POR) circuit and an internal Low Voltage Reset (LVR) circuit to ensure proper device operation. The POR circuit holds the MCU in reset until applied voltage reaches an appropriate level. The LVR forces the device into reset if input voltage falls too low, protecting against brown-out conditions. A user configurable Low-Voltage Detect (LVD) with interrupt output is also available. Consult the MC9S12G128 reference manual for details of POR, LVR, and LVD operation.TIMINGThe TWR-S12G128 internal timing source is active from RESET by default. An external 8MHz crystal oscillator, configured for low-power operation, is also installed. Refer to the target device RM for details on selecting and configuring the desired timing source.COMMUNICATIONSCommunications options for the TWR-S12G128 include serial RS-232, LIN, and CAN. Serial RS-232 communications is supported through a RS-232 physical layer device (PHY) and a 2x5 pin header. A high-speed, enhanced, LIN PHY provides LIN bus communications through a 2x2 Molex connector (pn 39-29-1048). A high-speed CAN PHY provides CAN bus communications through a 1 x 4 Molex connector (pn 39-30-3045).Connecting LIN cables require Molex housing, pn 39-01-2040 and pins, pn 39-00-0217. Connecting CAN cables require Molex housing, pn 39-01-4040, and pins, pn 39-00-0217.The COM_SEL option header connects the MCU SCI signal to either the LIN PHY or the RS-232 PHY. See Figure 6 below for jumper position options. See Figure 4 below for jumper position options.RS-232The TWR-S12G128 applies the MAX3387E, RS-232 transceiver to support serial communications. A standard 2x5 “Berg” pin-header on 0.1” centers and an IDC to DB9 cable supports connecting standard serial cables to the target board. Figure 4 below shows the SCI signal connections.Figure 4: Serial ConnectionsNOTE: For normal RS-232 operation, FORCEOFF* should be actively driven to the high level.Alternately, open CT5 to allow FORCEOFF* to float high.COM ConnectcorA 2x5, 0.1”, standard “Berg” pin-header provides external connections for the SCI port. Figure5 below shows the COM1 pin-out.Figure 5: COM1 Connector2, 71, 7TXD CTSRXD RTS1, 2 TP2GND NCCOM_ENThe COM_EN option header connects the MCU SCI port to either the SCI PHY or the LIN PHY. Figure 6 below shows the option jumper configuration for the COM_EN option header. Figure 6: COM_EN Option HeaderConnects target MCU SCI port to LIN PHY to enable LIN buscommunicationsConnects target MCU SCI port to RS-232 PHY to enable serialcommunicationsLIN PortThe TWR-S12G128 applies the MC33661 LIN bus physical layer device (transceiver) to support LIN communications. The PHY may be configured as a Master or Slave node on the LIN bus. LIN connectors J9 & J10 are configured in parallel to support pass-thru signaling. Figure 7 shows the LIN block diagram.Figure 7: LIN Block DiagramThe LIN interface provides optional features of slew rate control, network supply, and wake up option. Refer to the MC33661 Reference Manual for detail on PHY functionality. The following sections detail functionality for LIN option jumpers.LIN EnableThe LIN PHY is enabled by default. Disable the PHY by connecting the test point, TP3, to GND.LIN COM InputLIN inputs RX and TX are selectable using the COM_EN option header. Refer to Figure 6 above for details on configuring this header.LIN_PWR OptionThe LIN_PWR option jumper connects pin 1 of both LIN connectors to the +V input. In Master mode, this option may be used to power LIN slave devices. This option requires +12V be applied at E1/E2 inputs. In Slave mode, this option allows slave device to draw power from the LIN network. For Slave mode configuration, external power should not be applied to the target board. LIN_PWR is enabled by installing a shunt from JP3-1 to JP3-2. Refer to Figure 8 below.MSTR OptionThe MSTR option jumper allows the LIN transceiver to be configured for Master mode functionality. Master mode may also be set using the INH pin on the PHY. Refer to the MC33661 device datasheet for details on use and configuration. Refer to Figure 8 below.Figure 8: JP6 Option HeaderJP3Connects LIN bus to +V input (default)LIN_PWR Enables LIN Master mode functionality (default)NOTE: LIN PHY may also be configured as a Master Node using the INH pin. Refer to the LINPHY data sheet for details.LIN-J1 ConnectorThe TWR-S12G128 supports two, 2 x 2 Molex connectors to interface to the LIN bus. Figure 9 below details the pin-out of the LIN bus connector. Figure 9: LIN Connector4 3 +V2 1 GNDFront View – Looking into ConnectorNOTE: LIN Port Connector – Molex 39-29-1048 Mates with; Housing – Molex 39-01-2040, Pin – Molex 39-00-0036CAN PortOne, TJA1040T, High-Speed CAN physical-layer transceiver (PHY) is applied to support CANbus communications. A 4-pos, 4.22mm MOLEX connector interfaces to external CAN cabling. Differential input CAN signals, are terminated with 120 ohms. Option headers, JP13 and JP15 allow the user to optionally disconnect signal termination. Avalanche diodes protect the CAN PHY from voltage surges on the input differential signal lines. Figure 10 below shows the CAN connector pin-out. Figure 10: CAN_PORTN CG N DC A N LC A N HLooking into ConnectorNOTE: CAN Port Connector – Molex 39-30-3045Mates with; Housing – Molex 39-01-4040, Pin – Molex 39-00-0217CAN Termination EnableCAN bus termination of 120 ohm with virtual ground is applied to the differential CAN signals on both channels. The SPLIT output from each PHY is connected to the virtual ground providing common-mode stabilization. The differential CAN bus signal termination may be removed using option header JP13 or JP15. To prevent signal corruption, both option jumpers must be installed or both option jumpers must be removed. The CAN bus should not be operated with only 1 signal termination applied. Figure 11 below details the option header shunt positions.Figure 11: CAN Termination EnableEnables CANL termination1 2 Enables CANH terminationStandby ModeThe CAN PHY is configured for normal mode by default. To enable standby (STB) mode, apply a high logic level at test point TP1. Refer to the TJA1040T Reference Manual for use and capabilities of the Standby Mode.USER PERIPHERALSUser I/O includes 1 potentiometer, 4 push button switches, and 4 green LEDs for user I/O. The USER (JP14) option header enables or disables each User I/O function individually. The sections below provide details on user I/O. Figure 12 below shows the USER jumper settings.PotentiometerThe TWR-S12G128 target board applies a single-turn, 5K, ohm potentiometer (POT) to simulate analog input. The POT is connected to an ATD input on the target MCU and is decoupled to minimize noise transients during adjustment. Figure 12 below shows the USER jumper settings.User LED’sThe TWR-S12G128 target board applies 4, green, LEDs for output indication. Each LED is configured for active-low operation. A series, current-limit resistor prevents excessive diode current. Each LED is connected to a timer channel on the target MCU. Figure 12 below shows the USER jumper settings.Pushbutton SwitchesThe TWR-S12G128 provides 4 push-button switches for user input. Each push-button switch is configured for active-low operation and is connected to a key-wakeup input on the target MCU. No bias is applied to these push-button inputs and use of target MCU internal pull-ups is required for proper operation. Figure 12 below shows the USER jumper settings.Figure 12: JP1 Option HeaderSignal ON OFFPAD4/KWAD4/AN4 Enabled DisabledPAD5/KWAD5/AN5 Enabled DisabledPAD6/KWAD6/AN6 Enabled DisabledPAD7/KWAD7/AN7 Enabled DisabledPAD0/KWAD0/AN0 Enabled DisabledPT4/IOC4 Enabled DisabledPT5/IOC5 Enabled DisabledPT6/IOC6 Enabled DisabledPT7/IOC7 Enabled Disabled NOTE: User peripheral input/output is enabled by default.EDGE CONNECTOR PINOUTThe TWR-S12 board connects to the Freescale Tower System using the 2 PCIe Edge Connectors. Following the PCIe specification, the Bx signals are located on the top of the board and the Ax signals are located on bottom. Pin B1 for the primary and secondary connectors are at opposite ends of the board. The figures below show the pin-out of each edge connector.Figure 13: Primary Edge Connector5.0V Power Pri_B01 Pri_A01 5.0V PowerGround Pri_B02 Pri_A02 GroundPri_B03 Pri_A03Elevator Power Sense Pri_B04 Pri_A04Ground Pri_B05 Pri_A05 GroundGround Pri_B06 Pri_A06 GroundPS6/SCK0 Pri_B07 Pri_A07Pri_B08 Pri_A08PS7/API_EXTCLK/SS0 Pri_B09 Pri_A09 PD3Ground Pri_B49 Pri_A49 GroundPri_B50 Pri_A50 PA2Pri_B51 Pri_A51 PA3Pri_B52 Pri_A52 PA4Pri_B53 Pri_A53 PA5Pri_B54 Pri_A54 PA6Pri_B55 Pri_A55 PA7Pri_B56 Pri_A56Pri_B57 Pri_A57Figure 14: Secondary Edge ConnectorMISO1/KWJ0/PJ0 Sec_B11 Sec_A11Sec_B11ASec_B12 Sec_A12Sec_B13 Sec_A13Sec_B14 Sec_A14Sec_B15 Sec_A15PC1 Sec_B16 Sec_A16PC2 Sec_B17 Sec_A17 PC3PC4 Sec_B18 Sec_A18 PC5。

FreeScaleHCS12X内核单片机实验指导书

FreeScaleHCS12X内核单片机实验指导书

一般性实验1、所有资料存放在ftp://222.200.105.26目录“单片机教学->FreescaleS12XEP100实验课全部资料”2、关于如何安装、使用CodeWarrior软件,请参考子目录“CodeWarrior软件操作讲解视频”视频3、关于实验箱的电路连接,请参考子目录“实验箱电路PDF”下的PDF文档4、目录HCS12 demoExmples->xep100 2010-5-3是一个完整的Demo程序,包含S12XEP100单片机几乎所有外设以及实验箱所有模块的使用。

5、编写中断服务程序,需要了解中断向量表容,请参考MC9S12XS256RMV1.pdf文件:P162,Table4-10 Exception Vector Map and Priority.P53,Table 1-9. Reset Sources and Vector Locations.P54-55,Table 1-10. Interrupt Vector Locations.6、要正常产生中断,需要在主程序main()里,进入主循环(while(1), for(;;))之前加入以下语句:IRQCR_IRQEN=0; //关闭IRQIRQCR_IRQE=0;EnableInterrupts; //允许全局中断7、实验箱硬件连接步骤图示:(1)请按照下图插上电源线,并打开电源开关;(2)请按照下图示连接两根USB线,其中一根是USB转串口用,另一根是BDM调试用;实验一普通I/O口操作实验实验目的:1、熟悉CodeWarrior开发环境,熟悉HCS12X基本程序结构2、理解Freescale MCU的编程框架3、熟悉编程调试环境,新建工程、编译、调试、下载运行程序4、掌握I/O的基本编程方法例程序:demoXEPLED实验要求:1、参看实验箱电路PDF文档,熟悉实验板结构。

LED的连接如下图示:2、理解并运行关于I/O口操作的LED灯控制程序demoXEPLED3、在理解上述程序的基础上,按下列要求新建一工程,编写程序实现(要求用最简洁的语句实现以下各效果):(1)效果为:8个LED中只有一个灯亮,亮灯顺序是从左到右,再从右到左,一个周期时间长度约4秒。

MC9S12系列用户手册-第二部分

MC9S12系列用户手册-第二部分

NVM 定时:
17
所有的 NVM 程序和擦除操作的时间基准由振荡器决定。要求最小振荡频率 f NVMOSC 能够运行程序和擦除 操作。NVM 模式无法监测频率,所以无法防止程序和擦除操作在高于或低于指定最小频率上运行。尝试 在低频率下的 NVM 模式下运行程序和擦除操作的话,程序的完整性和擦除的转换无法保障。 FLASH 和 EEPROM 的编程和擦除操作, 是通过使用来自振荡器的时钟来计时, 该振荡器分别使用了寄存器 FCLKDIV 和 ECLKDIV。时钟的频率必须被设置到 f NVMOP 指定的范围。
i 2
I
PIO 是所有连接到 VDDX 和 VDDR 的 I/O 口输出电流的总和。
对于 R DSON 有效:
10
R DSON
VOL , 输出低电平驱动 I OL
VOH , 输出高电平驱动 I OH
2.Enabled
PINT I DDRVDDR I DDAVDDA
11
3.PC Board according to EIA/JEDEC Standard 51-7 FAQ:注意的 2 和 3 什么意思?
I/O 特性: 下表描述了所有 5V I/O 管脚特性。有些参数并不一定适用,比如说,不是所有的管脚都有上拉或者下 拉电阻。
电源电流: 所有测量没有输出负载,除非特别说明,电流以单片模式测量。内部电压调节器 enabled,在 Colpitts 模式下,25MHz 总线频率使用 4MHz 振荡器。产品的测试是在 EXTAL 端输入一个方波信号。
I DDR 是表 A-7 所示电流,不是全部的电流流进 VDDR,还有额外的流如外部负载的高电平电流。
PIO RDSON I IOi
i

飞思卡尔MC9S12XS128技术手册翻译AD

飞思卡尔MC9S12XS128技术手册翻译AD

飞思卡尔MC9S12XS128技术手册(AD转换部分)英文资料:飞思卡尔MC9S12XS256RMV1官方技术手册1.1 XS12系列单片机的特点XS12系列单片机特点如下:·16位S12CPU—向上支持S12模糊指令集并去除了其中的MEM, WAV, WAVR, REV, REVW 五条指令;—模块映射地址机制(MMC);—背景调试模块(BDM);·CRG时钟和复位发生器—COP看门狗;—实时中断;·标准定时器模块—8个16位输入捕捉或输出比较通道;;—16位计数器,8位精密与分频功能;—1个16位脉冲累加器;·周期中断定时器PIT—4具有独立溢出定时的定时器;—溢出定时可选范围在1到2^24总线时钟;—溢出中断和外部触发器;·多达8个的8位或4个16位PWM通道—每个通道的周期和占空比有程序决定;—输出方式可以选择左对齐或中心对其;—可编程时钟选择逻辑,且可选频率范围很宽;·SPI通信模块—可选择8位或16位数据宽度;—全双工或半双工通信方式;—收发双向缓冲;—主机或从机模式;—可选择最高有效为先输出或者最低有效位先输出;·两个SCI串行通信接口—全双工或半双工模式·输入输出端口—多达91个通用I/O引脚,根据封装方式,有些引脚未被引出;—两个单输入引脚;·封装形式—112引脚薄型四边引线扁平封装(LQFP);—80引脚扁平封装(QFP);—64引脚LQFP封装;·工作条件—全功率模式下单电源供电范围3.15V到5V;—CPU总线频率最大为40MHz—工作温度范围–40 C到125 C第十章模拟—数字转换10.1 介绍ADC12B16C是一个16通道,12位,复用方式输入逐次逼近模拟—数字转换器。

ATD的精度由电器规格决定。

10.1.1 特点·可设置8位、10位、12位精度·在停止模式下,ATD转换使用内部时钟·转换序列结束后自动进入低耗电模式·可编程采样时间·转化结果可选择左对齐或右对齐·外部触发控制·转换序列结束后产生中断·模拟输入的16个通道为复用方式·可以选择VRH、VRL、 (VRL+VRH)/2特殊转换方式·转换序列长度1到16·可选择连续转换方式·多通道扫描·任何AD通道均可配置外部触发功能,并且可选择4种额外的触发输入。

16蓝宙最小系统板MC9S12XS128-112 使用说明书

16蓝宙最小系统板MC9S12XS128-112 使用说明书

Freescale系列单片机MC9S12XS128-112最小系统板产品使用说明书版本:Version 1.0所有者:蓝宙电子研发部日期:2011.07.10目录最小系统板简介---------------------------------------- 最小系统板特性---------------------------------------- 最小系统板结构说明------------------------------------ 安装CodeWorror调试文件-------------------------------- 安装HC(S)12(X)内核CodeWorror调试文件----------------- 使用CodeWorror IDE烧写和调试程序的方法----------------简介:本店MC9S12XS128最小系统板是由多年专业项目开发经验的工程师根据当前实际单片机应用产品情况以及学生学习的角度定制,经过历多版和反复测试验证。

全部采用原装芯片和元器件,经典蓝板设计,PCB布局走线规范,采用高品质材料,稳定可靠,并采用回流焊工艺焊接,焊接质量高,系统板质量可靠。

这里描述的 9S12XS128 单片机基本系统模块是针对全国大学生飞思卡尔杯智能车模竞赛设计的,采用大赛组委会推荐的112引脚器件。

本开发板适用于嵌入式工程师与学生对M9S12系列单片机开发、学习,带CAN总线开发的工程项目。

MC9S12XS128微控制器产品满足了用户对设计灵活性和平台兼容性的需求,并在一系列汽车电子平台上实了可升级性、硬件和软件可重用性、以及兼容性。

S12XS 系列可以经济而又兼容地扩展至带 XGate 协处理器的S12XE 系列单片机,从为用户削减了成本,并缩小了封装尺寸。

S12XS系列帮助设计者迅速抓住市场机遇,同还能降低移植成本。

MC9S12XS128主要特性:S12XS系列单片机是在S12XE系列基础上去掉XGate协处理器的单片机。

如何快速读懂并理解MC9S12XE系列的编程手册

如何快速读懂并理解MC9S12XE系列的编程手册

如何快速读懂并理解MC9S12XE系列的编程手册在现今的经济社会,比拼的“快”不仅仅是速度快,更是效率高。

身处社会分工细致的今天,让自己更快效率更高是有方法的。

每一家MCU产商都会提供他们生产的MCU型号的datasheet,Reference Manual等各种说明手册。

这对于从事电子软件开发的人员来说,这是他们的第一手资料,也是他们最重要的参考资料,他们所有的软件设计工作都是参考手册上的内容,比如,硬件工程师可能比较在乎芯片的电气特性;MCU应用工程师关注外设,编程器时序开发人员则比较注重去理解Flash Module,在工作中他们要仔细并反复阅读他们所关注的部分。

最近则频繁的收到飞思卡尔芯片烧录不良的反馈,而且最多的集中在MC9S12XE这个系列上。

MC9S12XEP100这款飞思卡尔芯片跟平时我们所遇到的芯片相比有些特殊。

首先,它的Flash包括以下三部分:一、1MB的P-flash(Program Flash),非易失性代码存储器;二、32KB的D-flash(Data Flash),我们可以把它当作EEPROM;三、4KB的Buffer RAM。

其次,它三部分Flash特殊的地方:1)三部分Flash各部分分别映射在global Map的不同部分,并不是连续的。

所以对于所有的编写程序的工程师来说,要实现Flash Operations,首先要正确实现Flash Module 各部分的地址映射。

下图就是简单的一个映射说明:2)4KB的Buffer RAM。

虽然它就是一个RAM,但是它比较特殊,因为它的每次修改都会转储到D-Flash的一个分区中,每次上电会将该分区的内容自动加载到Buffer RAM中,所以它就是一个下电不丢失数据的RAM,我们就把它当作一个EEPROM。

MCU批量生产时的编程主要包括以下几部分,这里特别提醒做项目的工程师,烧录芯片是非常关键的,因为他包含了对整个MCU的Flash进行操作和加密:1)Flash 操作(编程、擦除、校验等)由于Buffer Ram的存在使得要实现Flash操作配置变得难度加大,因为对Buffer Ram的任何操作,最终都要更新到D-flash中的EEP中,所以在对Buffer Ram操作之前要对D-flash进行分区,分成D-flash和EEP两部分。

基于V流程的电动汽车VCU的开发和测试

基于V流程的电动汽车VCU的开发和测试

电动汽车整车控制系统电力驱动车辆是以电力作为能源、由电动机驱动的机动车辆。

在外形上, 电动车与传统的汽车并无显著差异, 它们的主要区别在于动力和驱动系统。

如图1 所示, 电动车的基本结构系统[2 ]可分为3 个子系统, 即电力驱动子系统(如图2 所示)、主能源子系统和辅助控制子系统。

其中, 电力驱动子系统由电控系统、电机、机械传动系统和驱动车轮等部分组成; 主能源子系统由主电源和能量管理系统构成, 能量管理系统是实现能源监控、能量再生、协调控制等功能的关键部件; 而辅助控制子系统主要是为电动车提供控制电源, 具有辅助电源的控制、动力转向、充电控制及空气调节等功能。

整车控制系统由整车控制器、通信系统、零部件控制器以及驾驶员操纵系统构成,其主要功能是根据驾驶员的操作和当前的整车和零部件工作状况,在保证安全和动力性的前提下,选择尽可能优化的工作模式和能量分配比例,以达到最佳的燃料经济性和排放标准。

(1)整车控制系统及功能分析1)控制对象:电动汽车驱动系统包括几种不同的能量好饿储能元件(燃料电池,内燃机或其他热机,动力电池和/或超级电容),在实际工作过程中包括了化学能、电能和机械能之间的转化。

电动汽车动力系统能流图如下:能量流信息流3)整车控制系统对车辆性能的影响主要有三个方面:①动力性和经济性②安全性③驾驶舒适性及整车的协调控制电动汽车整车控制系统如下:(2)整车控制器1)整车控制器功能:整车控制器是控制系统的核心,承担了数据交换、安全管理和能量分配的任务。

根据重要程度和实现次序,其功能划分如下。

①数据交互管理层②安全故障管理层③驾驶员意图层④能量流管理层2)整车控制器硬件:ControlBase_VT for AT/AMT/DCT/HEV/EV模块图环境试验电性能试验订购信息3)整车控制器的开发现在的ECU开发多采用V模式开发流程。

V模型开发流程如下:第一步,功能定义和离线仿真第二步,快速控制器原型和硬件开发第三步,目标代码生成第四步,硬件在环仿真第五步,调试和标定控制器开发采用国际流行的V流程开发模式,V流程开发模式示意图如下:控制器开发V流程V流程包含五个基本步骤:(1)图形化建模和离线仿真:在这个阶段,我们将控制器的开发需求转换为SIMULINK模型算法设计,将控制器的算法和被控对象的算法共同在MATLAB/SIMULINK环境下搭建。

基于MC9S12XEP100的整车控制器CANBootLoader设计与实现

基于MC9S12XEP100的整车控制器CANBootLoader设计与实现
杨 竞拮 , 王 志福 , 刘 杰
( 1 .北京 理工 大学电动车辆 国家工程实验室 ,北京 1 0 0 0 8 1 ;2 .北京蓝天海科清洁能源技术有 限公 司 ,北京 1 0 2 2 0 6 )

要 :为 了避免 因 使用 传 统 B D M 工 具进 行 下 载应 用 程序 带 来 的不 便 ,基 于 飞思 卡 尔 S 1 2 X系 列 微 控制 器
MC 9 S 1 2 X E P 1 0 0 ,设计并实现 了一个应 用于整车控制器上 的 C A N B o o t L o a d e r .该 B o o t L o a d e r 可以通过 进行 简单 的 配置修改而应用于其他 的 S 1 2 X系列微控制器.实验结 果表 明 :B o o t L o a d e r 能正确 引导程序 运行 ,准确 、方 便地
Ve h i c l e Co n t r o l Un i t Ba s e d o n M C9 S 1 2 XEP1 0 0
Y ANG J i n g . z h e , W AN G Z h i . f u , L I U J i e
( 1 .t h e N a t i o n a l L a b o r a t o r y f o r E l e c t r i c V e h i c l e s , B e i j i n g I n s t i t u t e o f t e c h n o l o g y , B e i j i n g , 1 0 0 0 8 1 ,C h i n a ;2 .B e i j i n g B l u e S k y H a r t c o u r t C l e a n E n e r y g T e c h n o l o y g L t d .C o . , B e i j i n g , 1 0 2 2 0 6 ,C h i n a )

MC9S12XET256MAA中文

MC9S12XET256MAA中文

MC912XET256MAA单片机数据手册目录1章设备概要MC9S12XE系列。

(27)2章端口一体化模块(s12xepimv1)。

(99)3章存储器映射控制(s12xmmcv4)。

(197)4章存储器保护单元(s12xmpuv1)。

(239)5章外部总线接口(s12xebiv4)。

(253)6章中断(s12xintv2)。

(275)7章背景调试模块(s12xbdmv2)。

(291)8章S12X调试(s12xdbgv3)模块。

(317)9章安全(s12xe9secv2)。

(361)10章XGATE(s12xgatev3)。

(367)11章S12XE时钟和复位发生器(s12xecrgv1)。

(489)12章皮尔斯振荡器(s12xosclcpv2)。

(523)13章模拟数字转换器(adc12b16cv1)。

(527)14章增强捕捉定时器(ect16b8cv3)。

(553)15章内部集成电路(iicv3)。

(607)16章可扩展的控制器区域网络(s12mscanv3)。

(635)17章定时器周期中断(s12pit24b8cv2)。

(693)18章定时器周期中断(s12pit24b4cv2)。

(713)19章脉冲宽度调制器PWM(s12pwm8b8cv1)。

(729)20章串行通信接口(s12sciv5)。

(761)21章串行外设接口(s12spiv5)。

(799)22章定时器模块(tim16b8cv2)。

(829)23章电压调节器(s12vregl3v3v1)。

(857)24章128字节的闪存模块(s12xftm128k2v1)。

(875)25章256字节的闪存模块(s12xftm256k2v1)。

(947)26章384字节的闪存模块(s12xftm384k2v1)。

(1019) 27章512字节的闪存模块(s12xftm512k3v1)。

(1091) 28章768 kbyteflash模块(s12xftm768k4v1)。

9s12xe-中文manual

9s12xe-中文manual

mc9s12xe系列单片机参考手册--中文1.3系统时钟介绍时钟和复位发生器模块(CRG)提供的核心和外设模块的所有内部时钟信号。

图1-8显示了从CRG所有模块的时钟连接。

在clock generation中查询CRG时钟产生的细节规范。

系统时钟可以提供多种方式,使系统的工作频率范围要支持:•片上锁相环(PLL)•锁相环自我时钟•振荡器由PLL或振荡器产生的时钟提供主系统时钟频率,核心时钟和总线时钟。

如图1-8所示,这些系统时钟用于驱动整个MCU的core,RAM,和外设。

闪存程序存储器和EEPROM可由总线时钟和振荡器时钟提供时钟信号。

“使用振荡器时钟作为时基,驱动程序,并提供NVM的擦除时间基准。

CAN模块可配置的时钟源来自总线时钟或直接从振荡器时钟。

这允许用户在提供的两种时钟信号的基础上,选择它的时钟性能。

为了确保时钟的存在,MCU包括一个片上时钟监视器,监视器连接到振荡器的输出。

时钟监视器可以被配置为调用PLL自震荡模式或在超过一定时间没有振荡器时钟出现,产生一次系统复位。

除了时钟监视器,MCU还提供了时钟质量检查模块执行时钟准确的检查。

时钟质量检查计数器在一个定义的时间窗口内检查预先设定了的时钟边沿,以确保时钟的正确运行。

检查程序可以被以下具体的事件调用,如唤醒或时钟监视器故障。

MCU可以处在不同的模式,而这与MCU资源的映射和总线接口配置操作相关。

这些内容将在1.4.1芯片配置摘要有提到。

MCU可以有不同的电源操作模式,当并不需要系统满负荷运行时,方便省电的模式是可选的。

这些内容将在1.4.2功率模式有提到。

1.4操作模式有些功能模块是可编程的,可以对某个模块进行冻结,而BGD模块的处于活动对于方便调试是有积极意义的,这在1.4.3冻结模式有提到。

对于系统的完整性,支持独立的系统状态功能,在1.4.4系统状态的说明有提到。

MCU有六个不同的模式而模式与系统资源配置相关。

不同的模式,ROMCTL与 EROMCTL在RESET信号的上升沿的状态,MCU的安全状态都会影响以下设备的特点:•外部总线接口配置•可能会影响Flash中的存储器映射,或不会•调试功能启用或禁用操作模式是由MODC,MODB和MODA在复位时的信号状态决定的。

基于MC9S12XEP100的BootLoader设计与实现

基于MC9S12XEP100的BootLoader设计与实现

10.16638/ki.1671-7988.2018.17.063基于MC9S12XEP100的BootLoader设计与实现王志强(天津职业技术师范大学汽车与交通学院车辆系,天津300000)摘要:程序的引导加载功能已是汽车电控单元中必不可少的部分,基于飞思卡尔16位处理器MC9S12XEP100,采用CAN总线技术,设计了一种BootLoader。

介绍了BootLoader的实现方法,包括底层驱动构成、引导机制设计、诊断模块设计、存储模块设计以及FLASH安全机制设计等。

实验结果表明,BootLoader能够正确引导程序运行,方便准确的进行控制器软件升级。

关键词:CAN总线;Flash模块;BootLoader;电控单元;安全机制中图分类号:U462.2 文献标识码:B 文章编号:1671-7988(2018)17-190-04Design and implementation of BootLoader base on MC9S12XEP100Wang Zhiqiang( Tianjin V ocational and Technical Normal University, School of Automobile and Transportation, Tianjin 300000 )Abstract: Bootloader function is one of the essential function of embedded system. A BootLoader is designed based on the 16-bit Freescale MCU MC9S12XEP100 and CAN bus. And the application of Bootloader is introduced, which includes driver module design, diagnostic module design, BOOT method design, memory module design, and Flash protected design. Experimental results show that Bootloader could boot the application accurately, downloads and upgrades correctly. Keywords: CAN bus; BootLoader; FLASH Module; ECU; SafetyCLC NO.: U462.2 Document Code: B Article ID: 1671-7988(2018)17-190-041 引言汽车电子电控单元ECU的开发周期较长,并且汽车电子产品开发对安全性、可靠性的指标要求很高。

MC9S12DG128实验系统使用手册

MC9S12DG128实验系统使用手册

MC9S12DG128实验系统使用手册目录第一章系统概述 (2)第二章硬件电路原理 (4)2.1子板硬件原理 (4)2.1.1、MCU引脚接口部分 (5)2.1.2、串口通信部分 (5)2.1.3、电源部分 (6)2.1.4、复位电路部分 (6)2.1.5、I/O端口电路部分 (7)2.1.6、晶振电路与BDM插头部分 (7)2.2母板硬件原理 (8)2.2.1、电源部分 (8)2.2.2、MC9S12DG128开发板与各接口部分 (9)2.2.3、串口通信部分 (11)2.2.4、LED数码管显示部分 (12)2.2.5、8位数字量输入输出部分 (13)2.2.6、红外发射接收部分 (14)2.2.7、LCD显示部分 (15)2.2.8、模拟量输入部分 (15)2.2.9、蜂鸣器和喇叭部分 (15)2.2.10、键盘输入部分 (16)2.2.11、继电器部分 (16)2.2.12、打印机部分 (17)2.2.13、CAN总线部分 (17)第三章 MC9S12DG128教学平台快速入门 (18)3.1硬件连接 (18)3.2软件应用 (20)第一章系统概述天津工业大学Freescale MCU/DSP研发中心开发的DG128实验系统,其功能基本上和美国MCUSLK系统相同,而且根据中国的教学情况重新设计了一些功能、力求达到更好的实验效果。

DG128实验系统由主板和独立的MCU子板构成。

DG128实验系统的主板插槽和美国的MCUSLK 系统相互兼容,主板的插槽可以插包括S12、S08、 HC08各系列MCU子板。

MCU子板可以单独调试运行,也可以插在主板上调试,充分利用主板丰富的硬件资源。

MC9S12DG128具有16位中央处理器(HCS12 CPU)、128KB Flash EEPROM、8KB RAM、2KB EEPROM,以及定时器通道、键盘中断和A/D通道等接口。

MC9S12DG128实验系统可以直接与CodeWarrior相连,具有下载程序、在线单步运行、断点调试、连续运行、修改寄存器和存储单元等特点,可以很方便的进行教学。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
3.1 安装 CodeWarrior 软件……………………..……………………..……………….....................................17 3.2 安装 BDM 驱动…………………………….……………………..……………….........................................17 3.3 创建新工程…………………………….………….….…………..……………….........................................17 3.4 调试新建工程……………….…….………….…………………..………………........................................21 第 4 章 基础实验………………………….………………..…………………..……………........................................25 实验一 复位及看门狗…….….………………..…………………..………………........................................25 实验二 蜂鸣器实验……………………………..…………………..………………........................................27 实验三 LED 灯实验……….…..…..……………..…………………..………………........................................28 实验四 按键实验……………………………..…………………..………….………........................................29 实验五 ATD 实验…………..……….……....….………………..………….………........................................33 实验六 锁相环实验…………………………..…………………..………….……….......................................37 实验七 SCI 串口实验……………..…………..…………………..………….……….......................................38 实验八 PWM 实验……………….….……..…………………..………….………............................................41 实验九 ECT 实验………………..…..…..….………………..………….………..............................................42 实验十 实时中断实验……….…….….…………..……..……….……….................................................44 实验十一 PIT 实验…………..………..…………………..………….……….................................................45 实验十二数码管实验……..………..…………………..………….……….................................................46 第 5 章 高级实验……………..…………………..……………..………….………..................................................47 实验一 数字电压表..…………………..……………..………….………....................................................47 实验二 数字秒表及定时器…..……………..………….……….........................................................48 实验三 蜂鸣器播放音乐……..……………..………….………............................................................50 实验四 汉显液晶实验…………..……………..………….………..........................................................51 实验五 ZX0802A 小液晶实验..………..……..………….……….........................................................53 实验六 遥控模块实验…………..……………..………….………..........................................................54 实验七 温度传感器实验………..……………..………….……….........................................................56 实验八 RS-485 总线实验……..…….………..………….………..........................................................58 实验九 LIN 总线实验……..……………...………….……….................................................................59 实验十 CAN 总线实验……..…………....………….……….................................................................63 实验十一 SAE-J1939 实验...………….……….….……….................................................................66 实验十二 SD 卡实验………....………….……….….……….................................................................67 实验十三 综合演示实验…....………………….….……….................................................................69 实验十四 双核协同工作实验………………….….………...............................................................70 实验十五 DFLASH 实验.…………..….…….….………….………..........................................................76
2.2 LED电路 该开収板设计有 8 个独立的 LED,通过单片机的 I/O 口直接控制。电路采用了 I/O 口灌
4
单股跳线连接线
飞翔科技
网店地址
双股跳线连接线
5
12V电源适配器
飞翔科技
网店地址
串口延长线
6
可以选配的配件主要有: BDM 下载器
飞翔科技
网店地址
开収的一款开収板。该开収板硬件资源丰富,布局清晰明了,利用该开収板的硬件资源可熟 悉和掌握XEP100单片机的功能,充分体现出汽车电子的特色。
本部分将对XEP100开収板的功能迚行简单介绍,以方便用户快速了解该开収板的功能。 下图为XEP100开収板实物图。
与开収板配合使用的还有以下几个配件: 跳线帽
8
飞翔科技
网店地址
调试CAN总线通信。 ●485总线:该模块使用MAX485芯片,本开収板有一路485接口,使用两块开収板,用户可 调试485总线通信。 ●AD:两路AD辒入,熟悉单片机的AD模块功能。 ●ECT:可调试单片机内部定时器相关功能,熟悉单片机的定时器功能。 ●PWM:可调试单片机的PWM波辒出的功能。 ●IIC接口:方便用户调试IIC模块的功能。 ●SPI接口:方便用户调试SPI模块的功能。 ●无线遥控接口:在接口上揑上无线遥控模块,用户可以调试无线遥控功能。 ●数码管模块:可调试数码管的扫描程序,可以显示数字。 ●12864液晶接口:可以调试12864液晶模块,并调试IIC和模拟IIC的功能。 ●ZX0802A小液晶接口:可以调试ZX0802A小液晶模块。 ●温度传感器:本开収板使用18B20芯片测量温度。 ●SD卡接口:可以调试SPI模式的SD卡读写。 ●MC9S12XEP100最小系统:最小系统包拪单片机、晶振电路、调试接口、复位按键和挃示 灯等组成。
飞翔科技
网店地址
MC9S12XEP100 开収板 实验挃导手册
1
飞翔科技
网店地址
目录
第 1 章 MC9S12XEP100 开収板概述…..........................................................................................4 第 2 章 MC9S12XEP100 开収板结极………………….……………………………………………………………………10 第 3 章 CodeWarrior 快速入门…………………….…………………………………….........................................17
下图对板载资源迚行了详细的标注。
9
飞翔科技
网店地址
第 2 章 MC9S12XEP100 开収板结极
2.1 电源电路 该开収板的电源电路可以适用于 12V 汽车电源。该套件提供的电源为 12V 的直流电源。
12V 的电源经过保险丝 F11 迚入电源芯片。F11 为 750mA 的保险丝,对电路起保护作用。 LM2940 为电源转换芯片,可将接入的电源电压转换成 5V。 D12 为电源挃示灯。电路中的 电容起到稳压和滤波的功能。R2 和 R3 将电源电压分压后接到单片机的 AD 口,用于电源电 压的监测。
相关文档
最新文档