功能代碼 設置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
|