Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/20/04 15:34
Read: times


 
#77720 - RE: Problem with my code
Responding to: ???'s previous message
We are to write two programs-one without debounce and one with it-even the program with debounce didn't work. It looked like this:

.ORG 2000H
MOV A,#9FH ;SET UP
MOV DPTR,#0F803H ; PORT A
MOVX @DPTR,A ; AS AN INPUT
MOV A,#89H ;SET UP
MOV DPTR,#0F903H ; PORT E
MOVX @DPTR,A ; AS AN OUTPUT
MOV 40H,#00 ;CLEAR FLAG-IS LED ON/OFF
MOV A,#0FFH
MOV DPTR,#0F901H ;POINT TO PORT E
MOVX @DPTR,A ;TURN OFF ALL LED ATTACHED TO PORT E
DELAY:ACALL DLY250 ;CALL DELAY(SWITCH BOUNCE)
READ:MOV DPTR,#0F800H ;POINT TO PORT A
MOVX A,@DPTR
JNZ DELAY ;
MOV A,40H ;MONITOR FLAG
JNZ CLEAR ;
INC 40H ;SET FLAG
MOV DPTR,#0F901H ;POINT TO PORT E
MOV A,#0FEH ;
MOVX @DPTR,A ;TURN ON LED
SJMP DELAY
CLEAR:DEC 40H ;CLEAR FLAG
MOV DPTR,#0F901H ;POINT TO PORT E
MOV A,#0FFH ;
MOVX @DPTR,A ;TURN OFF LED
SJMP DELAY

DLY250:MOV R3,#3
LOOP:MOV R4,#150
LOOP1:MOV R5,#255
LOOP2:NOP
DJNZ R5,LOOP2
DJNZ R4,LOOP1
DJNZ R3,LOOP
RET


List of 55 messages in thread
TopicAuthorDate
Problem with my code            01/01/70 00:00      
   RE: Problem with my code            01/01/70 00:00      
      RE: Problem with my code            01/01/70 00:00      
   RE: Problem with my code            01/01/70 00:00      
      RE: Problem with my code            01/01/70 00:00      
   RE: Problem with my code            01/01/70 00:00      
      RE: Problem with my code            01/01/70 00:00      
         RE: Problem with my code            01/01/70 00:00      
            RE: Problem with my code            01/01/70 00:00      
               RE: Problem with my code            01/01/70 00:00      
               RE: Problem with my code            01/01/70 00:00      
                  RE: Antiques            01/01/70 00:00      
                  RE: Problem with my code            01/01/70 00:00      
                     can't count            01/01/70 00:00      
                        RE: can't count            01/01/70 00:00      
                  RE: Problem with my code            01/01/70 00:00      
                     Validity of state            01/01/70 00:00      
                        RE: Validity of state            01/01/70 00:00      
                           RE: Validity of state            01/01/70 00:00      
                        RE: Validity of state            01/01/70 00:00      
            RE: Problem with my code            01/01/70 00:00      
               Another for the teacher            01/01/70 00:00      
               Fighting academia            01/01/70 00:00      
                  RE: Fighting academia            01/01/70 00:00      
                     RE: Fighting academia            01/01/70 00:00      
                  RE: Fighting academia more            01/01/70 00:00      
                  RE: Fighting academia            01/01/70 00:00      
               RE: Problem with my code            01/01/70 00:00      
                  RE: Problem with my code            01/01/70 00:00      
   RE: Problem with my code            01/01/70 00:00      
      RE: Problem with my code            01/01/70 00:00      
   RE: Replacing school hardware            01/01/70 00:00      
      RE: Replacing school hardware            01/01/70 00:00      
         RE: Replacing school hardware            01/01/70 00:00      
      RE: Replacing school hardware            01/01/70 00:00      
         RE: Replacing school hardware            01/01/70 00:00      
            RE: Replacing school hardware            01/01/70 00:00      
               RE: Replacing school hardware            01/01/70 00:00      
                  RE: Lisas problem            01/01/70 00:00      
                  Debounce, and define current problem            01/01/70 00:00      
                     RE: Debounce, and define current problem            01/01/70 00:00      
                        Defining debouncing            01/01/70 00:00      
                           RE: Defining debouncing            01/01/70 00:00      
                              You got it            01/01/70 00:00      
            RE: good old 6809            01/01/70 00:00      
      RE: Replacing school hardware            01/01/70 00:00      
         RE: Replacing school hardware            01/01/70 00:00      
            STUPID marketing policy            01/01/70 00:00      
               Possibly not entirely stupid...?            01/01/70 00:00      
                  RE: Possibly not entirely stupid...?            01/01/70 00:00      
            RE: Replacing school hardware            01/01/70 00:00      
               RE: Replacing school hardware            01/01/70 00:00      
   C.Steiner, Atari and dev. systems..            01/01/70 00:00      
   RE: Problem with my code            01/01/70 00:00      
      RE: Problem with my code            01/01/70 00:00      

Back to Subject List