dac42cfg.asm
来自「ADUC842 C程序集,包括ADC,DAC,PLL,PWM,WDT等程序.」· 汇编 代码 · 共 41 行
ASM
41 行
;File: dac42cfg.a51
;Author: Eckart Hartmann Date:17/10/2003
; Development progress: Dac842.df
;
;DacCfg==========Configures DAC.
;C Function prototype: char DacCfg(char cDaccon);
;Description of Function: Puts parameter 1 in DACCON SFR.
;User interface: Set the following bits of parameter to 1:
; Bit 0 to power up DAC0.
; Bit 1 to power up DAC1.
; Bit 2 for synchronous DAC update.
; Bit 3 to clear DAC0.
; Bit 4 to clear DAC1.
; Bit 5 for DAC0 range to AVdd (not Vref).
; Bit 6 for DAC1 range to AVdd (not Vref).
; Bit 7 for 8bit only results.
; Call DacCfg. Parameter is put in DACCON.
; Returns parameter.
;Robustness:
;Side effects: Overwrites a, P.
;
NAME DACCFG
$NOMOD51
$IC(..kei842.inc) ; Parameter passing registers for Keil .
$IC(..kei842.dat) ; SFR definition for Keil .
;
public _DacCfg
?PR?_DacCfg?DACCFG SEGMENT CODE
RSEG ?PR?_DacCfg?DACCFG
_DacCfg:
mov DACCON,cP1l
ret
;
;Function End==========================================================Function End
END
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?