het_pwm_01_h.het

来自「tmp470开发板的源程序」· HET 代码 · 共 29 行

HET
29
字号
;******************************************************************************
;  TMS470 Demo -  HET PWM Sample Program
;
;  Program name :  HET_PWM_01_H.het associated with C program HET_PWM_01.c
;
;  This is a simple HET program that generate two PWMs of 25% and 50% duty cycle.
;  using the ECMP instruction to generate pulses on HET on CC0 and CC2 thus
;  lighting the corresponding LEDs.
;
;  John Mangino / Andreas Dannenberg
;  Texas Instruments, Inc
;  May 2005
;  Built with IAR Embedded Workbench Version: 4.20A
;  A256 EVM
;*******************************************************************************

; Implement a counter that uses register A and rolls over at 0x214A
L00: CNT  {next=L01, reg=A, irq=OFF, max=0x214A, data=0}

; PWM (50% duty cycle)
L01: ECMP {next=L02, reg=A, hr_lr=LOW, en_pin_action=ON, pin=CC0, action=PULSEHI, irq=Off, data=0x10A5}

; PWM (25% duty cycle)
L02: ECMP {next=L03, reg=A, hr_lr=LOW, en_pin_action=ON, pin=CC2, action=PULSEHI, irq=Off, data=0x852}

L03: BR	  {next=L00, cond_addr=L00, event=NOCOND}


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?