| ??? 07/10/02 06:49 Read: times |
#25564 - RE: R registers |
Dear Felix,
I dont speak in the air, i have read the forum,and realized a count using the builtin T counter regs.I have seen a sample, which i cannot understand, but would like to understand. Following sample... xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx DELAY: ; delay 100ms MOV R7,#200 ; 200 * 500us = 100ms DLY1: MOV R6,#229 ; 229 * 2.17us = 500us DJNZ R6,$ ; sit here for 500us DJNZ R7,DLY1 ; repeat 200 times(100ms delay) RET xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx What I dont understand realy: MOV R7,#200: . . . DJNZ R7,DLY1 ; repeat 200 times(100ms delay) ------------ Why does it 100ms delay? It fills only R7 with 200? Which is beeing used to count down from 200 but each countdown takes 500us. Why is differenet R6 and R7 (500us and 2.17us)? Thnx, Peter |
| Topic | Author | Date |
| R registers | 01/01/70 00:00 | |
| RE: R registers | 01/01/70 00:00 | |
| RE: R registers | 01/01/70 00:00 | |
| RE: R registers | 01/01/70 00:00 | |
| RE: R registers | 01/01/70 00:00 | |
| RE: R registers | 01/01/70 00:00 | |
| RE: R registers | 01/01/70 00:00 | |
| RE: R registers | 01/01/70 00:00 | |
| RE: R registers | 01/01/70 00:00 | |
| RE: R registers | 01/01/70 00:00 | |
RE: R registers | 01/01/70 00:00 |



