当前位置:文档之家› 飞思卡尔MCU中文资料

飞思卡尔MCU中文资料

Slide 7
TM
Freescale Semiconductor Confidential and Proprietary Information. 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. 2005.
Slide 2
TM
Freescale Semiconductor Confidential and Proprietary Information. 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. 2005.
Created with SmartPrinter trail version
A/D控制寄存器5
Address offset $0005
ATDCTRL5
SCAN – 连续转换模式 1 = 连续转换模式 0 = 单次转换 DSGN – 符号选择 1 = 有符号 0 = 无符号 MULT – 多通道采样模式 1 = 多通道转换 0 = 单通道转换
Star12 CPU
SIM CM BDM
MEBI PIT
PIM PLL
msCAN 4 or IIC
msCAN 3
msCAN 2
msCAN 1
BDLC or msCAN 0
4K BYTES EEPROM
ECT 8 CHAN
Slide 1
TM
Freescale Semiconductor Confidential and Proprietary Information. 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. 2005.
Created with SmartPrinter trail version
转换时间
A/D 时钟
总是2 个 时钟周期
2, 4, 8, 16 时钟周期
CCF标志位置位,如果在8通道模式下,序列结束
转换时间计算举例:
(假设 2MHZ A/D 时钟频率)
例 1: 转换时间 = Initial Sample Time + Programmed Sample Time + Resolution Period = 2 + 2 + 10 = 14 A/D Clocks = 7uSec 例 2: 转换时间= Initial Sample Time + Programmed Sample Time + Resolution Period = 2 + 16 + 10 = 28 A/D Clocks = 14uSec
Created with SmartPrinter trail version
A/D 控制寄存器3
ATDCTRL3 Address offset $0003
FIFO – 结果寄存器 FIFO 1 = 结果寄存器没有映射到转换序列 0 = 结果寄存器没有映射到转换序列
转换序列长度
采样时间选择
SRES8 - A/D 精度选择 1=8位 0 = 10位 5位 模数计数器预分频器 - 由A/D控制寄存器中的PRS[4:0]控制 - 分频系数从2到64 - 如果 PRS[4:0] = 0, 预分频不起作用 注: 设置PRS[4:0]时, A/D Clock 不能大于 2 MHz.
PRS0-PRS4
FRZ 00 01 10 11 Reserved
Response Ignore IFREEZE Finish conversion, then freeze Freeze Immediately
转换序列长度就是需要转换的通道数 比如: 通道0,1,2作为AD采集通道 则转换序列为3,即S2C=1,S1C=1 在控制寄存器5 ATD0CTL5中: 设CC CB CA = 0 0 0,转换序列从通 道0开始;ATD0DR0, ATD0DR1,ATD0DR2存放转换结果 设CC CB CA = 0 1 0,转换序列从通 道2开始。 仍然是ATD0DR0, ATD0DR1,ATD0DR2存放转换结果
Slide 5
TM
Freescale Semiconductor Confidential and Proprietary Information. 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. 2005.
DJM – 对齐方式 1 = 右对齐 0 = 左对齐
通道选择 0 0 0 = Chan 0 1 1 1 = Chan 7
注意:对这个寄存器写操作时,将会中断当前的转换,然后重新启动新的转换序列
Slide 8
TM
Freescale Semiconductor Confidential and Proprietary Information. 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. 2005.
Created with SmartPrinter trail version
A/D 时钟选择/ 预分频
• 最大 A/D 时钟 = 2.0 MHz (最小 A/D CLOCK = 0.5 MHz)
ATDCTL4(HI) - A/D 控制寄存器 Address offset $0004
Created with SmartPrinter trail version
A/D转换模块
ATD 1 ATD 0 12K SRAM 256K FLASEEPROM
SCI 1
SCI 1
Internal Bus
SPI 2 SPI 1 or or PWM PWM PWM SPI 0 8 CH CH CHAN 4-7 0-3 BKP INT MMI
ETRIGE 0 0 1 1 1 1
SCAN 0 1 X X X X
描述 忽略外部触发,执行一次转换后停止 忽略外部触发,执行连续转换后 下降沿触发,每次触发,执行一次转换 上升沿触发,每次触发,执行一次转换 低电平触发,每次触发,执行连续转换 高电平触发,每次触发,执行连续转换
Freescale Semiconductor Confidential and Proprietary Information. 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. 2005.
SMP [1:0] 00 01 10 11
采样时间 2 A/D时钟周期 4 A/D时钟周期 8 A/D时钟周期 16 A/D时钟周期
系统时钟
5位 模数计数器 预分频器
Slide 6
TMБайду номын сангаас
除2
A/D 时钟
Freescale Semiconductor Confidential and Proprietary Information. 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. 2005.
Freescale HCS12 微控制器
TM
Freescale Semiconductor Confidential and Proprietary Information. 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. 2005.
相关主题