数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

AN913 数据表(PDF) 8 Page - STMicroelectronics

部件名 AN913
功能描述  PWM GENERATION WITH THE ST62 16-BIT AUTO-RELOAD TIMER
PDF  12 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  STMICROELECTRONICS [STMicroelectronics]
网页  http://www.st.com
标志 STMICROELECTRONICS - STMicroelectronics

AN913 数据表(HTML) 8 Page - STMicroelectronics

Back Button AN913 Datasheet HTML 4Page - STMicroelectronics AN913 Datasheet HTML 5Page - STMicroelectronics AN913 Datasheet HTML 6Page - STMicroelectronics AN913 Datasheet HTML 7Page - STMicroelectronics AN913 Datasheet HTML 8Page - STMicroelectronics AN913 Datasheet HTML 9Page - STMicroelectronics AN913 Datasheet HTML 10Page - STMicroelectronics AN913 Datasheet HTML 11Page - STMicroelectronics AN913 Datasheet HTML 12Page - STMicroelectronics  
Zoom Inzoom in Zoom Outzoom out
 8 / 12 page
background image
8/12
PWM GENERATION WITH THE ST62 16-BIT AUTO-RELOAD TIMER
;*** TIMER Initialisation ***
ldi
tcr,0ffh
; Load the counter
ldi
tscr,01001000b
; Restart the timer with input tone
; from input pin which is connected to the
; OVFFLG of ARTIMER.
; The prescaler is 1
;*** PortA initialisation for PWM and OVF output
ldi
ddra,0ch
ldi
ora,0ch
;*** ART16 Initialisation ***
ldi
SCR2,00h
; CP1 input interrupt disable
ldi
SCR3,00h
; CP2 and ZEROFLG interrupt disable
; PWM output is run in SET/RESET mode
ldi
SCR4,0Fh
; OVFPOL=1, Overflow enable, PWMPOL=1,
; PWM enable
ldi
RLCPH,001h
; 100h for 8 bit of PWM, 77h to have time to
ldi
RLCPL,077h
; load the CMP register, and to have with
; 8MHz and a prescaler of 1/4 a
; Digital Analog Converter
; sample tone equivalent to 5319hz.
ldi
MASKH,0FFh
; MASK = 0FFFFh
ldi
MASKL,0FFh
ldi
SCR1,0B2h
; prescal by 4 to have a sample tone of 2MHz
; Reload mode
; Runres =1 to start the counter
; No interrupt with overflow
; Toggle mode to give 2000 Hz to the timer
; (with toggle mode it's not necessary to
; reset the OVFFLAG)
;*** GENERAL INTERRUPT ***
ldi
ior,10h
; Enable all interrupts.
;***************************************************************************
;*************************** DTMF GENERATION *******************************
DTMF:
;*** calculation of the first tone ***
ld
a,Lsb_ton1
; load tone Lsb
add
a,Lsb_inc1
; add it to the increment Lsb
ld
Lsb_ton1,a
; save the result
ldi
a,0
; initiate a to 0 for no carry
jrnc
nocarry1
; test carry of the previous result
ldi
a,1
; if carry a=1 to add 1 to the Msb addition
nocarry1:
add
a,Msb_ton1
; add the carry to the tone Msb



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com