资源简介
发动机源代码,里面含有案例,可以进行更改,这个代码比其他的代码便宜,采用的是S12x芯片

代码片段和文件信息
/*******************************************************************************
Copyright (c) 2007 Freescale Semiconductor
Freescale Confidential Proprietary
\brief Driver for basic S12XE ADC operation
\author r66193
\version 0.1
\date May/2008
*******************************************************************************/
#include “mc9s12xep100.h“
#include “comdef.h“
#include “stdio.h“
#include “crg.h“
#include “xgate.h“
#pragma DATA_SEG SHARED_DATA
INT16U AtdData[16];
void InitADC(void)
{
DDR0AD0 = 0;
DDR1AD0 = 0; // All 16 Channels are used
ATD0CTL0 = 0x0F; // B0000_1111: multiple channel conversion (MULT=1) wraparound
// to AN0 after converting A15
ATD0CTL1 = 0xD3; // B 1101_0011:
// |--| ----
// |\|| \-: External triggger is PIT Channel1
// | ||-----: Discharge before sample
// | |------: 12bit resoltion
// |--------: External trigger
ATD0CTL2 = 0x46; // B 0100_0100
// || --|||-: Compare interrupt interrupt disable
// || \|||--: Sequence completed interrupt disable
// || ||---: External trigger mode enable
// || |----: falling edge trigger not used for PIT trigger
// ||-------: Convertion abort in STOP mode
// |--------: Fast flag clear
ATD0CTL3 = 0x80; // B 1000_0000
// |-----|--
// | \| |\-: Continue in debugger
// | | |--: FIFO mode not used
// | |-----: 16 sequence conversion
// |--------: Result right justified
ATD0CTL4 = 0x44; // B 0100_0100
// --|------
// \| \-: PSR=4 ATD clk=4M @ 40M busclk
// |------: Sample time = 8 clk
ATD0CTL5 = 0x10; // B 0001_0000
// ||| ----
// ||| \-: First channel is AN0
// |||-----: Multi channel sample mode
// ||------: Single conversion sequence
// |-------: Special channel conversion disabled
}
/*******************************************************************************
* \brief ADC single conversion SW trigger
* \param const unsigned int chan
* \return unsigned int
*/
/*
INT16U lle_ADC(INT8U u8ADC_chan)
{
ATD0CTL5_Cx = u8ADC_chan;
while(!ATD0STAT0_SCF); // Wait for end of conversion
ATD0STAT0_SCF = 1;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2011-06-19 17:21 飞思卡尔小型发动机EMS源代码\
目录 0 2018-09-26 21:04 飞思卡尔小型发动机EMS源代码\Install application Map Tool\
文件 153088 2009-07-21 23:33 飞思卡尔小型发动机EMS源代码\Install application Map Tool\Example Scooter Map.xls
文件 133632 2009-07-21 23:31 飞思卡尔小型发动机EMS源代码\Install application Map Tool\Map Tool.xls
目录 0 2018-09-26 21:04 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\
目录 0 2018-09-26 21:02 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\
目录 0 2018-09-26 20:57 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\bin\
文件 105 2008-05-04 11:24 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\bin\P&E_Multili
文件 503398 2018-09-26 21:02 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\bin\SofTec_HCS12.abs
文件 16608 2018-09-26 21:02 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\bin\SofTec_HCS12.abs.glo
文件 16418 2018-09-26 21:02 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\bin\SofTec_HCS12.abs.s19
文件 278699 2018-09-26 21:02 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\bin\SofTec_HCS12.map
目录 0 2008-05-04 11:24 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\cmd\
文件 1514 2008-05-04 11:24 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\cmd\P&E_Multili
文件 59 2008-05-04 11:24 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\cmd\P&E_Multili
文件 60 2008-05-04 11:24 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\cmd\P&E_Multili
文件 60 2008-05-04 11:24 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\cmd\P&E_Multili
文件 229 2008-05-04 11:24 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\cmd\P&E_Multili
文件 77 2008-05-04 11:24 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\cmd\P&E_Multili
文件 78 2008-05-04 11:24 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\cmd\P&E_Multili
文件 59 2008-05-04 11:24 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\cmd\SofTec_HCS12_Postload.cmd
文件 60 2008-05-04 11:24 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\cmd\SofTec_HCS12_Preload.cmd
文件 60 2008-05-04 11:24 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\cmd\SofTec_HCS12_Reset.cmd
文件 229 2008-05-04 11:24 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\cmd\SofTec_HCS12_Startup.cmd
文件 77 2008-05-04 11:24 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\cmd\SofTec_HCS12_Vppoff.cmd
文件 78 2008-05-04 11:24 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\cmd\SofTec_HCS12_Vppon.cmd
文件 1943 2008-05-14 11:01 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\C_Layout.hwl
文件 161 2004-06-15 12:43 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\Default.mem
文件 46 2008-05-20 00:52 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\dump.s
文件 1012 2008-05-04 11:24 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\P&E_Multili
目录 0 2008-05-04 11:24 飞思卡尔小型发动机EMS源代码\Install Crankshaft Simulation Software\s12xe_12t24t\prm\
............此处省略463个文件信息
- 上一篇:osg天空盒源程序
- 下一篇:2018年中青杯数学建模
相关资源
- 飞思卡尔单片机MC9S12XS12G128驱动(硬件
- SecureCRT v7.0 注册机
- SecureCRT-6.0.2安装包和SecureCRT-6.0.2注册
- SecureCRT 非常好用的串口工具
- 串口调试工具 SecureCRT
- win7超级终端SecureCRT
- Cisco Secure PIX 535防火墙产品简介
- Cisco Secure PIX 515防火墙产品资料
- Investigation of the Lower Resistance Meridian
- 飞思卡尔68HC08Metrowerks_CodeWarrior开发软
- SecureFX版本7注册机
- 飞思卡尔单片机.s19文件方法详解
- Spring Security架构以及源码详析
- SecureCRT7.3注册码
-
Secure Task Allocation ba
sed on Anonymous I - Enol functionalized N-heterocyclic carbene lan
- ECU调试软件
- springBoot+security+oauth2 资源和认证分离
- The evolution and origin of animal Toll-like r
- SecureCRT 8.5.3 Build 1867(X64)原版 + ZW
- 滤波-卡尔曼滤波-互补滤波
- 实现飞思卡尔两轮智能车的直立芯片
- SecureCRT 8.0注册机
- Spring Boot和Spring Security4最新整合
- Synthesis and photophysical properties of star
- Molecular identification polymorphism and asso
-
A triphenylamine-ba
sed four-armed molecule - 固态硬盘安全擦除Windows版本secure er
- 矿区重型柴油汽车发动机的使用与维
- Study on the Pyrolysis of methyl tert-butyl et
评论
共有 条评论