功能代码 设置128阶电流型模拟信号输出 汇编和C两种代码
chip sn8p2758
.data
.code
org 00h
jmp main
org 10h
//============================================================================
// DAC
//============================================================================
main:
mov a,#01111111b // Setting value as 0xxxxxxxb -->0~127
b0mov dam,a // Set DAB to a half of the full scale.
b0bset fdaenb // Enable D/A function
//============================================================================
//
// User code
//
//============================================================================
jmp main
|