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/06 20:13
Read: times


 
#124715 - It is ok but KBIF is set forever
Responding to: ???'s previous message
Hi Folks,

Erik I understand you, but now my problem is that I can't clear KBIF.
For test purposes I reduce my code only to an interrupt detector to check the state of the KBIF. When I run this program on the simulator I can see KBIF set when the pattern match. Then the program would clear KBIF and returns from interrupt, but it goes to an infinite loop to the interrupt.
This program was tested with raisonance IDE version 6.10.15 and with uVision3 version 3.10a and the behavior is the same.



;***********************************
;* BIT DEFINITIONS
;***********************************
	IB_M BIT P0.6			; EXTERNAL INTERRUPT PIN
;***********************************
; RESET
;***********************************
        ORG 0000H
        SJMP START
;***********************************
; KEYBOARD INTERRUPT VECTOR
;***********************************
        ORG 003BH
INT_KBI:
	MOV KBCON,#00H			; CLR KBIF TO PERMIT NEXT INT. KBCON ISNT BIT ADDRESABLE
	RETI
;***********************************
; STARTS HERE
;***********************************
START:
	MOV SP,#69H                	; STACK DEFINITION = 70H - 7FH
;***********************************
; KEYPAD CONFIGURATION
;***********************************
	MOV KBMASK,#040H		; MASK FOR P0.6 ONLY
	MOV KBPATN,#000H		; INTERRUPTS WHEN 0
        MOV KBCON,#002H		        ; INTERRUPTS WITH PATTERN MATCH, KBIF=0
        MOV IEN1,#02H			; ENABLES KEYPAD INT
        MOV IEN0,#80H                	; ENABLES GLOBAL
;***********************************
;* MAIN PROGRAM 
;***********************************
MAIN_01:	
	JMP MAIN_01
;***********************************
	END 				


 


Where is the mistake?

Thanks
Roberto Muñoz

List of 22 messages in thread
TopicAuthorDate
LPC 9xx Can't clear KBIF            01/01/70 00:00      
   Turn it off?            01/01/70 00:00      
   I could turn it off            01/01/70 00:00      
      to turn the KBIF, you have to change the condition            01/01/70 00:00      
         Thanks Erik - I'll give it a go            01/01/70 00:00      
            an added comment            01/01/70 00:00      
               What is the rate of change on the input signals?            01/01/70 00:00      
                  nothing of value except the ability to wake up the            01/01/70 00:00      
                     Interrupt for pulse train            01/01/70 00:00      
                        that's basically what the KBI does            01/01/70 00:00      
                  Rate of change ~<100kHz            01/01/70 00:00      
               why not?            01/01/70 00:00      
                  I did not discuss            01/01/70 00:00      
                     It is ok but KBIF is set forever            01/01/70 00:00      
                        that you do not clear the reason            01/01/70 00:00      
                           I change the state of the pin before            01/01/70 00:00      
                              could be the problem            01/01/70 00:00      
                                 Simulators problem            01/01/70 00:00      
   Remote Control using AT89C2051 schematic            01/01/70 00:00      
      just great            01/01/70 00:00      
         Another BS answer.            01/01/70 00:00      
            No BS, I did            01/01/70 00:00      

Back to Subject List