MC9S12XEP100开发板实验指导手册
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)课程实验内容与指导实验参考: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 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位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系列芯片在线烧录指南

产品应用笔记
©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演示板用户指南说明书

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内核单片机实验指导书

一般性实验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系列用户手册-第二部分

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
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
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 口,用于电源电 压的监测。