资源描述:
《MC9S12单片机原理及嵌入式应用开发技术 第2版 陈万忠 电子课件 教学课件 2 第2章 单片机内部结构.ppt》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、CollegeofCommunicationEngineering,JilinUniversity第2章S12XS单片机内部结构2CollegeofCommunicationEngineering,JilinUniversity2.1S12XS单片机性能2.2CPU的构成2.3存储器2.4并行I/O第2章S12XS单片机内部结构CollegeofCommunicationEngineering,JilinUniversity2.1S12XS单片机性能4CollegeofCommunicationEnginee
2、ring,JilinUniversity2.1.1S12XS系列单片机内部模块InternalBusSCI1PWM8CHANECT12KSRAMHCS12CPUBKPINTMMICMBDMMEBI4KBYTESEEPROMSIMmsCAN3msCAN2msCAN1SCI0SPI2orPWMCH4-7msCAN0orBDLCmsCAN4orIICSPI1orPWMCH0-3SPI0PLLPIT256KFLASEEPROMCRGVREGPIMAD0AD12.1S12XS单片机性能5CollegeofCommuni
3、cationEngineering,JilinUniversity1.16位CPU2.内部RAM或ROM:3.A/D模块:16路8位、10位或12位;4.CAN模块:支持CAN2.0A、B两种协议,1Mbps;5.TIM模块:标准定时器,输入捕捉、输出比较6.PIT模块:4通道24位递减计数器7.PWM模块:8通道8位,或4通道16位,占空比可编程;8.串口模块:两个SCI,支持LIN协议;一个SPI;9.中断模块:最多20个带位中断的外部中断引脚,中断源细分为7级;10.时钟模块:可通过内部锁相环使片内总线
4、速度提升到最高40MHz。2.1.2S12XS系列单片机主要功能模块2.1MC9S12XS单片机的性能2.1MC9S12XS单片机的性能2.1.3S12XS系列单片机引脚功能时钟,复位电源调试系列引脚1P17图2-2112LQFP封装CollegeofCommunicationEngineering,JilinUniversity2.2CPU的构成9CollegeofCommunicationEngineering,JilinUniversity2.2CPU的构成2.2.1算术逻辑运算单元2.2.2控制单元2
5、.2.3核心寄存器组10CollegeofCommunicationEngineering,JilinUniversity单片机(微控制器)基本组成MCUStructureTheCPURegistersfile(寄存器组)Instructionlatch/decode/branch(指令)Stack(栈)Interrupt(中断)Clock/Reset(时钟/复位)Memoryperipheral11CollegeofCommunicationEngineering,JilinUniversity单片机(微控
6、制器)基本组成MCUStructureTheCPURegistersfile(寄存器组)Instructionlatch/decode/branch(指令)Stack(栈)Interrupt(中断)Clock/Reset(时钟/复位)Memoryperipheral12CollegeofCommunicationEngineering,JilinUniversityAcompleteCPU13CollegeofCommunicationEngineering,JilinUniversityCPU–thecor
7、eofmicrocontrollerTheCPUcontains:ArithmeticLogicUnit(算术逻辑单元)Registerfile(寄存器组)ControlUnit(控制单元)FloatpointprocessUnitCachemanagementMemoryManagementUnit14CollegeofCommunicationEngineering,JilinUniversity2.2.1CPU的构成——算术逻辑单元ALUALU--ArithmeticLogicUnitPerformsa
8、rithmeticfunctionssuchasadd,subtract,multiply,dividelogicfunctionssuchasAND,OR,NOT,XORbitfunctionssuchshift,rotation4个要素Twoinputdata--operands(操作数)instruction--operation(运算)Status--flag(标志位)oneoutputda