| 数据搜索系统,热门电子元器件搜索 |
|
AN913 数据表(PDF) 9 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN913 数据表(HTML) 9 Page - STMicroelectronics |
|
9 / 12 page ![]() 9/12 PWM GENERATION WITH THE ST62 16-BIT AUTO-RELOAD TIMER add a,Msb_inc1 ; add it to the increment Lsb ld Msb_ton1,a ; save the result ;*** calculation of sin(2*PI*f) with look up table *** andi a,03fh ; mask the Msb tone to call the look up table addi a,040h ; add the result to the address table ld x,a ;use the indirect pointer x to read the data ;*** calculation of the second tone *** ld a,Lsb_ton2 ; load tone Lsb add a,Lsb_inc2 ; add it to the increment Lsb ld Lsb_ton2,a ; save the result ldi a,0 ; initiate a to 0 for no carry jrnc nocarry2 ; test carry of the previous result ldi a,1 ; if carry a=1 to add 1 to the Msb addition nocarry2: add a,Msb_ton2 ; add the carry to the tone Msb add a,Msb_inc2 ; add it to the increment Lsb ld Msb_ton2,a ; save the result ;*** calculation of sin(2*PI*f) with look up table *** andi a,03fh ; mask the Msb tone to call the look up table addi a,040h ; add the result to the address table ld y,a ; use the indirect pointer y to read the data ld a,(y) ; read the data ;*** add the two sinus *** add a,(x) ; add to the first tone ;*** wait overflow *** wait_ovf: jrr OVFFLG,SCR1,wait_ovf res OVFFLG,SCR1 ; reset the overflow ;*** load compare register with a new value *** ld CMPL,a jp DTMF ;*************Subroutine Tone Generation ************** ;*** Input with accumulator a for the number to make InitTone: ldi drwr,21h ; Rom window with num_dial sla a sla a addi a,40h ld x,a ld a,(x) ld Msb_inc1,a; First tone |
|
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| 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 |