MOV R0, # 00 h
LOOP:...
DJNZ R0, LOOP
Why R0 is 0, can also perform loop 256 times
CodePudding user response:
Dear bosses, small white
CodePudding user response:
DJNZ R0, LOOP
Is judgment R0 is equal to 0 after the jump, R0-1
Now R0=0
0-1=255 (8) is not equal to zero, to minus 256 times before he is 0
Circular 256 nothing wrong,
CodePudding user response:
FPGA reference 2 floor?????? Response: DJNZ R0, LOOP Is judgment R0 is equal to 0 after the jump, R0-1 Now R0=0 0-1=255 (8) is not equal to zero, to minus 256 times before he is 0 Circular 256 nothing wrong, Who is this 0-1=255, this number is 0 ~ 255 in R0 is such a cycle, that is what you mean? CodePudding user response:
So to understand CodePudding user response:
The FPGA reference 4 floor?????? Response: so to understand ORG 00 h MOV. A, # 24 h LOOP: MOV P1, # 01 h LCALL DELAY CJNE A, # 65 h, LOOP1 LOOP1: MOV P1, # 00 h LCALL DELAY CJNE A, # 65 h, LOOP DELAY: MOV R7, # 250 L2: MOV R6, # 250 L1: DJNZ R6, L1 DJNZ R7, L2 RET END Hello, can you help to look at again, I this circulate two leds light where the program is wrong in the CodePudding user response:
For help, small white online, etc CodePudding user response:
Understand understand, understand understand CodePudding user response:
Code more disorderly, simply look at the code, though more organs in some places, but should be able to perform, you step down, can understand a lot of things, in the debugging CodePudding user response:
references in the fifth floor wave small little dragon reply: Quote: FPGA reference 4 floor?????? Response: so to understand ORG 00 h MOV. A, # 24 h LOOP: MOV P1, # 01 h LCALL DELAY CJNE A, # 65 h, LOOP1 LOOP1: MOV P1, # 00 h LCALL DELAY CJNE A, # 65 h, LOOP DELAY: MOV R7, # 250 L2: MOV R6, # 250 L1: DJNZ R6, L1 DJNZ R7, L2 RET END Hello, can you help to look at again, I this circulate two leds light where the program is wrong in the What phenomenon? There is only one light out? Twice to P1 assignment, only changed the state of a lamp, CodePudding user response:
references 9 f xuyaosong response: Quote: refer to fifth floor small waves, little dragon response: The Quote: FPGA reference 4 floor?????? Response: so to understand ORG 00 h MOV. A, # 24 h LOOP: MOV P1, # 01 h LCALL DELAY CJNE A, # 65 h, LOOP1 LOOP1: MOV P1, # 00 h LCALL DELAY CJNE A, # 65 h, LOOP DELAY: MOV R7, # 250 L2: MOV R6, # 250 L1: DJNZ R6, L1 DJNZ R7, L2 RET END Hello, can you help to look at again, I this circulate two leds light where the program is wrong in the What phenomenon? There is only one light out? Twice to P1 assignment, only changed the state of a lamp, I figure is to use an interface to control two leds, make two leds flashing out CodePudding user response:
Find someone to write program of the hardware is stc12c5024ad hardware, 2 slices ready with 22.1184 crystals with hc244 do 12 road input a 64 - bit dial the code switch do address input 4 tpic6b595 2 set of output a 485 and Siemens plc200 do credit to PLC program written 12 road by n address input count alarm display