欢迎访问ic37.com |
会员登录 免费注册
发布采购

HT46R065D 参数 Datasheet PDF下载

HT46R065D图片预览
型号: HT46R065D
PDF下载: 下载PDF文件 查看货源
内容描述: 增强A / D型MCU,具有高电流LED驱动器 [Enhanced A/D Type MCU with High Current LED Driver]
分类和应用: 驱动器
文件页数/大小: 114 页 / 744 K
品牌: HOLTEK [ HOLTEK SEMICONDUCTOR INC ]
 浏览型号HT46R065D的Datasheet PDF文件第57页浏览型号HT46R065D的Datasheet PDF文件第58页浏览型号HT46R065D的Datasheet PDF文件第59页浏览型号HT46R065D的Datasheet PDF文件第60页浏览型号HT46R065D的Datasheet PDF文件第62页浏览型号HT46R065D的Datasheet PDF文件第63页浏览型号HT46R065D的Datasheet PDF文件第64页浏览型号HT46R065D的Datasheet PDF文件第65页  
HT46R064D/065D/066D  
Enhanced A/D Type 8-Bit OTP MCU with LED Driver  
PWM Output Control  
The PWM outputs are pin-shared with the I/O pins PA7 and PC1. To operate as a PWM output and not  
as an I/O pin, the correct bits must be set in the CTRL0 register. Azero value must also be written to the  
corresponding bit in the I/O port control register PAC.7 and PCC.1 to ensure that the corresponding  
PWM output pin is setup as an output. After these two initial steps have been carried out, and of course  
after the required PWM value has been written into the PWMn register, writing a high value to the  
corresponding bit in the output data register PA.7 and PC.1 will enable the PWM data to appear on the  
pin. Writing a zero value will disable the PWM output function and force the output low. In this way,  
the Port data output registers can be used as an on/off control for the PWM function. Note that if the  
CTRL0 register have selected the PWM function, but a high value has been written to its  
corresponding bit in the PAC or PCC control register to configure the pin as an input, then the pin can  
still function as a normal input line, with pull-high resistor options.  
PWM Programming Example  
The following sample program shows how the PWM0 output is setup and controlled.  
mov  
mov  
set  
set  
clr  
set  
:
a,64h  
pwm0,a  
ctrl0.5  
ctrl0.3  
pac.7  
pa.7  
; setup PWM value of decimal 100  
; select the 7+1 PWM mode  
; select pin PA7 to have a PWM function  
; setup pin PA7 as an output  
; enable the PWM output  
:
pa.7  
clr  
; disable the PWM output_ pin  
; PA7 forced low  
Rev. 1.00  
56  
January 12, 2011  
 复制成功!