没有合适的资源?快使用搜索试试~ 我知道了~
英飞凌TC767单片机例程-PWM
需积分: 25 16 下载量 110 浏览量
2018-10-18
10:46:49
上传
评论
收藏 1.25MB PDF 举报
温馨提示
试读
47页
英飞凌TC767单片机例程-PWM,tasking编译环境,用于熟悉PWM输出控制
资源推荐
资源详情
资源评论
General Purpose Timer Array
Exercise GPTA_LTC_PWM
Page 2
confidential
Exercise GPTA_LTC_PWM
Objective
Using 5 Local Timer Cells (LTC), generate a PWM signal with switchable
duty cycle and period (Signal 0 and Signal 1).
Signal 0 has a period of 100us and a duty cycle of 20%,signal 1 has a
period of 200us and a duty cycle of 75%.
Every time the user strikes a key on its keyboard (using MTTY), the
signal toggles from one duty cycle / period configuration to the other.
The character is also echoed back to the PC.
The update of the duty cycle / period is fully coherent and is observed on
a scope.
Let‟s get started now!
Page 3
confidential
Exercise GPTA_LTC_PWM
Block diagram
PC
Receive ASC
Buffer
Interrupt Routine
Priority 1
TC1767
TxD
RS 232
Scope
Trigger
Software Control
TxD
Signal 0
Signal 1
GPTA
Pin 0.1
Pin 5.0
Channel
Page 4
confidential
Exercise GPTA_LTC_PWM
Application of 5 LTC cells
LTC0 is used as a reset timer cell and is the time base for the
other cells.
LTC1 defines Period 0, LTC3 Duty cycle 0. They are active when
their input signal “SI” is set to 0.
LTC2 defines Period 1, LTC4 Duty cycle 1. They are active when
their input signal “SI” is set to 1.
Toggling the output “SO” of LTC0 activates either one pair of cells
or the other.
As a result, either Signal 0 or Signal 1 can be observed at the
output of LTC4.
Page 5
confidential
Coherent update of the Period and of the Duty Cycle
Timer
Compare_0(Period)
Compare_0(Duty)
Compare_1(Duty)
0
1
Compare_1(Period)
-1
Output
Reset
timer
Coherent_Update_Enable_Flag
Toggle S
i
Line
Select S
i
Output High/Low
1
0
0
Exercise GPTA_LTC_PWM
PWM Signal Update (Coherent)
剩余46页未读,继续阅读
资源评论
youhumaple
- 粉丝: 1
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功