8051 assembly code to generate triangular wave on November 08, 2012 Get link Facebook X Pinterest Email Other Apps ORG 0 CLR A UP:INC A MOV P2,A CJNE A,#0FFH,UP LCALL DELAY DOWN: DEC A MOV P2,A CJNE A,#00,DOWN LCALL DELAY SJMP UP END Comments UnknownNovember 20, 2012 at 6:19 AMWhat type of delay could you use here,I thought Timer 0 Mode 2 in an 8051DELAY: MOV TH0,#0F9H SETB TR0HERE: JNB TF0,HERE CLR TF0ReplyDeleteRepliesAbdullah GubbiJuly 12, 2021 at 11:40 PMDELAY:H2:MOV R0,#12H;H1: MOV R1,#0F7H;MOV R2,# 0FFH;AGAIN : DJNZ R2, AGAIN;DJNZ R1, H1;DJNZ R0,H2;RET;DeleteRepliesReplyReplyUnknownAugust 26, 2019 at 1:40 AMSAHOOOOOOOReplyDeleteRepliesUnknownAugust 26, 2019 at 1:41 AM#FFCDeleteRepliesReplyAbdullah GubbiJuly 12, 2021 at 11:38 PMUSE #FFHDeleteRepliesReplyReplyAdd commentLoad more... Post a Comment
What type of delay could you use here,
ReplyDeleteI thought
Timer 0 Mode 2 in an 8051
DELAY:
MOV TH0,#0F9H
SETB TR0
HERE: JNB TF0,HERE
CLR TF0
DELAY:H2:MOV R0,#12H;
DeleteH1: MOV R1,#0F7H;
MOV R2,# 0FFH;
AGAIN : DJNZ R2, AGAIN;
DJNZ R1, H1;
DJNZ R0,H2;
RET;
SAHOOOOOOO
ReplyDelete#FFC
DeleteUSE #FFH
Delete