Saturday, April 30, 2016

8051 Program – sawtooth wave

; sawtooth wave generation
; standard 8051
; 8-bt DAC interfaced on P1
ORG 0H
PORT EQU P1
STEPS EQU 255
MAIN:
LCALL SAWTOOTHWAVE
SJMP MAIN
SAWTOOTHWAVE:
MOV PORT,#00H
MOV R0, #STEPS
MOV A, #00H
cycle:MOV PORT,A
INC A
DJNZ R0, cycle
RET
END



Related topics:
8051 Program - 1khz square wave   |   8051 Program - 2khz square wave   |   8051 Program - 10khz square wave   |   8051 Program - pwm   |   8051 Program - sine wave   |   8051 Program - triangular wave   |   8051 Program - stair wave   |   8051 Program - memory subroutines   |   8051 Program - math subroutines   |   8051 Program - conversion subroutines

List of topics: 8051

No comments:

Post a Comment