JM60 and keyboard interrupt

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

JM60 and keyboard interrupt

1,776 次查看
donw
Contributor IV
I am using the DEMOJM60 kit and trying to get a keyboard interrupt from
PORTA 4, to take the micro out of STOP mode.
I have followed code from a 908JL8 program which works OK.
I cannot cause an interrupt.
Initialise code:
       CLR     KBISC             ;SETUP PORT A4 RXD INT      
        CLR    KBIES               ;FALLING EDGE  INCASE GLITCH WHILE PULLUP TURNS ON
       
        CLR   PTADD
        LDA    #$20                  ;PULLUP  R PORTA4
        STA    PTAPE                                                                                                
        STA    KBIPE               ;A4 INT enable                         
        LDA    #4                     ;KBISC_KBACK
        STA    KBISC              ;CLR FALSE INT
        ORA    #2                    ;KBISC_KBIE
        STA     KBISC              ;INT ON
        CLI
        STOP
         ....

At the start of the program I have enabled STOP mode:
        LDA     #$20    ;ALLOW STOP MODE
        STA     SOPT1                                              

       
What am I missing?


标签 (1)
0 项奖励
回复
2 回复数

666 次查看
Ake
Contributor III
Hi,
I looked in the MC9S08JM60 manual, Figure 9-1, and what I can see the KBI is connected to port B4/5, port D2/3 and port G0/1/2/3.
Port A4 is not connected to the keyboard interrupt module.
Or have I missed something?
 
Regards,
Ake
0 项奖励
回复

666 次查看
donw
Contributor IV
Yes you are correct!
I assumed this micro used PORTA (like many others) for keyboard ints!
Thanks.
0 项奖励
回复