Skip to main content
8051 assembly code to generate sine wave
ORG 0000H
CLR A
UP : MOV DPTR,#SINE
MOV R0,#24
LABEL: MOVC A,@A+DPTR
MOV P2,A
CLR A
INC DPTR
DJNZ R0,LABEL
SJMP UP
ORG 050H
SINE :
DB 127,160,191,217,237,250,255,250,237,217,191,160,127,94,63,37,17,4,0,4,17,37,63,94,127
END
Why 24 is moved in R0
ReplyDeleteas look up table consist of 24 values
DeleteHow to change grid size
ReplyDeleteWhy in my simulator it is showing "Syntax Error - DB"
ReplyDeleteWrite like this
DeleteSine: db(the values.....)
How to get the values of lookup table if we want 40 or more values?
ReplyDeleteAny idea please help.
Algorithm for this program
ReplyDelete