??? 01/02/08 21:38 Read: times |
#148970 - Found it Responding to: ???'s previous message |
;*************************************** STEPLOOP: MOV R1,#200 ;LOOP COUNTER SET TO 200 TIMES STEPLOOPER: setb STEPOUT ; TURN ON STEP OUTPUT PIN CALL STEPON ; LEAVE PIN ON 1uSEC clr STEPOUT ; TURN OFF STEP OUTPUT PIN CALL STEPOFF DJNZ R1,STEPLOOPER <------ loop falls through here ;*************************************** to a subroutine ;*************************************** ; .5 SEC DELAY ROUTINE DELAY: MOV R7,#0AH ;OUTER LOOP COUNTER SET TO 10 TIMES MOV R5,#236 ;INNER LOOP COUNT SET TO 236 TIMES LOOP2: MOV R6,#00H ;MIDDLE LOOP SET TO 256 TIMES LOOP1: DJNZ R5,LOOP1;LOOP 256 TIMES DJNZ R6,LOOP1;LOOP 236 TIMES DJNZ R7,LOOP2;LOOP 10 TIMES RET ;RETURN PROGRAM <--- POW! ;*************************************** Jon |
Topic | Author | Date |
8052 help w/ my code please | 01/01/70 00:00 | |
How to program a stepper driver | 01/01/70 00:00 | |
Delay | 01/01/70 00:00 | |
this makes absolutely no sense | 01/01/70 00:00 | |
tried commenting delay | 01/01/70 00:00 | |
no offense, but THINK | 01/01/70 00:00 | |
ah | 01/01/70 00:00 | |
yes | 01/01/70 00:00 | |
What is oscillator speed? | 01/01/70 00:00 | |
osc speed | 01/01/70 00:00 | |
MEGAHENRY? | 01/01/70 00:00 | |
oops | 01/01/70 00:00 | |
Try this | 01/01/70 00:00 | |
Not the cure | 01/01/70 00:00 | |
SWITCHES | 01/01/70 00:00 | |
Was that YOUR simulator, Jon? :-) | 01/01/70 00:00 | |
Pinnacle52 | 01/01/70 00:00 | |
Found it | 01/01/70 00:00 | |
Almost there | 01/01/70 00:00 | |
any LEDs? | 01/01/70 00:00 | |
no led's | 01/01/70 00:00 | |
then use the scope as a LED... :-) | 01/01/70 00:00 | |
but not THIS nonsense! | 01/01/70 00:00 | |
good idea | 01/01/70 00:00 | |
Try it now. | 01/01/70 00:00 | |
I think, Steve meant, he will try to use the scope | 01/01/70 00:00 | |
Oh..OK | 01/01/70 00:00 | |
It works![]() | 01/01/70 00:00 |