I'm having some trouble in migrating a 16f74 application to the 18c452. I'm using MPLAB ICE to debug it. I'm trying to generate an interrupt on a negative edge on RB0. I've set complex trigger settings to halt the processor 50 steps after input 0 goes to 0. I have input 0 tied to the RB0 pin. When I look at the trace, I can see input 0 going low and staying low during the remainder of the trace buffer. Since the processor halted during that trace, I'd expect RB0 to show up as a 0 on the special function register window. It shows up as a 1. TRISB0 is set to 1, so this line is an input. The processor makes no attempt to handle the interrupt. I suspect this is due to RB0 still reading as 1. If I ground RB0 and single step the processor once, RB0 does show up as a 0 in the SFR window, and intcon:1 goes high, as expected. I'm watching the RB0 signal on a scope. It's going all the way down to 0V (within 1 mv) and up to 5.20V. Anyone have any ideas? I've used the INT pin for years on the 16c74. This is the first time I've tried to use it on the 18c452. I have the 452 set to not use priority interrupts. Here's some of the trace... 0184 520E AUTOFADE MOVF 0xE --- -- --- -- 00000011 0000001819 0186 A4D8 BTFSS status,0x2 00E 01 00E 01 00000011 000000181A 0188 EFEA GOTO FD8 00 --- -- 00000011 000000181B 018A F000 (Forced NOP) --- -- --- -- 00000011 000000181C 01D4 A00F AFD BTFSS 0xF,0x0 --- -- --- -- 00000011 000000181D 01D6 0012 RETURN 00F BE --- -- 00000011 000000181E 01D8 900F (Forced NOP) --- -- --- -- 00000011 000000181F 00F8 0004 CLRWDT --- -- --- -- 00000011 0000001820 00FA EF38 GOTO --- -- --- -- 00000011 0000001821 00FC F000 (Forced NOP) --- -- --- -- 00000011 0000001822 0070 5026 LOOP MOVF 0x26,W --- -- --- -- 00000011 0000001823 0072 5C42 SUBWF 0x42,W 026 00 W 00 00000011 0000001824 0074 B0D8 BTFSC status,0x0 042 00 W 00 00000011 0000001825 0076 EF41 GOTO FD8 07 --- -- 00000011 0000001826 0078 F000 (Forced NOP) --- -- --- -- 00000011 0000001827 0082 5042 LOOPA MOVF 0x42,W --- -- --- -- 00000011 0000001828 0084 6E20 MOVWF 0x20 042 00 W 00 00000011 0000001829 0086 5020 LOOPB MOVF 0x20,W --- -- 020 00 00000011 000000182A 0088 A880 BTFSS porta,0x4 020 00 W 00 00000011 000000182B 008A ECA0 (Forced NOP) F80 10 --- -- 00000011 000000182C 008C F001 (nop) NONDIMADJUST --- -- --- -- 00000011 000000182D 008E 6E39 MOVWF 0x39 --- -- --- -- 00000011 000000182E 0090 5027 MOVF 0x27,W --- -- 039 00 00000011 000000182F 0092 5C43 SUBWF 0x43,W 027 00 W 00 00000011 0000001830 0094 B0D8 BTFSC status,0x0 043 00 W 00 00000011 0000001831 0096 EF51 GOTO FD8 07 --- -- 00000011 0000001832 0098 F000 (Forced NOP) --- -- --- -- 00000011 0000001833 00A2 5043 LOOPC MOVF 0x43,W --- -- --- -- 00000011 0000001834 00A4 6E20 MOVWF 0x20 043 00 W 00 00000011 0000001835 00A6 5020 LOOPD MOVF 0x20,W --- -- 020 00 00000011 0000001836 00A8 AE2A BTFSS 0x2A,0x7 020 00 W 00 00000011 0000001837 00AA ECA0 (Forced NOP) 02A FD --- -- 00000011 0000001838 00AC F001 (nop) NONDIMADJUST --- -- --- -- 00000011 0000001839 00AE 6E3A MOVWF 0x3A --- -- --- -- 00000011 000000183A 00B0 5028 MOVF 0x28,W --- -- 03A 00 00000011 000000183B 00B2 5C44 SUBWF 0x44,W 028 00 W 00 00000011 000000183C 00B4 B0D8 BTFSC status,0x0 044 00 W 00 00000011 000000183D 00B6 EF61 GOTO FD8 07 --- -- 00000011 000000183E 00B8 F000 (Forced NOP) --- -- --- -- 00000011 000000183F 00C2 5044 LOOPE MOVF 0x44,W --- -- --- -- 00000010 0000001840 00C4 6E20 MOVWF 0x20 044 00 W 00 00000010 0000001841 NOTE that external input 0 went to a 0 here. This is tied to RB0. 00C6 5020 LOOPF MOVF 0x20,W --- -- 020 00 00000010 0000001842 00C8 A281 BTFSS portb,0x1 020 00 W 00 00000010 0000001843 00CA ECA0 (Forced NOP) F81 07 --- -- 00000010 0000001844 00CC F001 (nop) NONDIMADJUST --- -- --- -- 00000010 0000001845 00CE 6E3B MOVWF 0x3B --- -- --- -- 00000010 0000001846 00D0 5029 MOVF 0x29,W --- -- 03B 00 00000010 0000001847 00D2 5C45 SUBWF 0x45,W 029 00 W 00 00000010 0000001848 00D4 B0D8 BTFSC status,0x0 045 00 W 00 00000010 0000001849 00D6 EF71 GOTO FD8 07 --- -- 00000010 000000184A 00D8 F000 (Forced NOP) --- -- --- -- 00000010 000000184B 00E2 5045 LOOPG MOVF 0x45,W --- -- --- -- 00000010 000000184C 00E4 6E20 MOVWF 0x20 045 00 W 00 00000010 000000184D 00E6 5020 LOOPH MOVF 0x20,W --- -- 020 00 00000010 000000184E 00E8 A481 BTFSS portb,0x2 020 00 W 00 00000010 000000184F 00EA ECA0 (Forced NOP) F81 07 --- -- 00000010 0000001850 00EC F001 (nop) NONDIMADJUST --- -- --- -- 00000010 0000001851 00EE 6E3C MOVWF 0x3C --- -- --- -- 00000010 0000001852 00F0 ECA3 CALL --- -- 03C 00 00000010 0000001853 00F2 F001 (Forced NOP) --- -- --- -- 00000010 0000001854 0346 1C83 READTHUMBWHEEL COMF portd,W --- -- --- -- 00000010 0000001855 0348 6E50 MOVWF 0x50 F83 FE W 01 00000010 0000001856 034A 1C81 COMF portb,W --- -- 050 01 00000010 0000001857 034C 6E4F MOVWF 0x4F F81 07 W F8 00000010 0000001858 034E 3A4F SWAPF 0x4F --- -- 04F F8 00000010 0000001859 0350 0E07 MOVLW 0x7 04F F8 04F 8F 00000010 000000185A 0352 164F ANDWF 0x4F --- -- W 07 00000010 000000185B 0354 6A4E CLRF 0x4E 04F 8F 04F 07 00000010 000000185C 0356 ECE6 CALL 04E 00 04E 00 00000010 000000185D 0358 F003 (Forced NOP) --- -- --- -- 00000010 000000185E 07CC 6A4C BCDTOB CLRF 0x4C --- -- --- -- 00000010 000000185F 07CE 504E MOVF 0x4E,W 04C 02 04C 00 00000010 0000001860 07D0 0B0F ANDLW 0xF 04E 00 W 00 00000010 0000001861 07D2 6E4D MOVWF 0x4D --- -- W 00 00000010 0000001862 07D4 ECD1 CALL --- -- 04D 00 00000010 0000001863 07D6 F003 (Forced NOP) --- -- --- -- 00000010 0000001864 07A2 90D8 MPY10A BCF status,0x0 --- -- --- -- 00000010 0000001865 07A4 344D RLCF 0x4D,W FD8 07 FD8 06 00000010 0000001866 07A6 6E52 MOVWF 0x52 04D 00 W 00 00000010 0000001867 07A8 344C RLCF 0x4C,W --- -- 052 00 00000010 0000001868 07AA 6E51 MOVWF 0x51 04C 00 W 00 00000010 0000001869 07AC 90D8 BCF status,0x0 --- -- 051 00 00000010 000000186A 07AE 364D RLCF 0x4D FD8 06 FD8 06 00000010 000000186B 07B0 364C RLCF 0x4C 04D 00 04D 00 00000010 000000186C 07B2 90D8 BCF status,0x0 04C 00 04C 00 00000010 000000186D 07B4 364D RLCF 0x4D FD8 06 FD8 06 00000010 000000186E 07B6 364C RLCF 0x4C 04D 00 04D 00 00000010 000000186F 07B8 90D8 BCF status,0x0 04C 00 04C 00 00000010 0000001870 07BA 364D RLCF 0x4D FD8 06 FD8 06 00000010 0000001871 07BC 364C RLCF 0x4C 04D 00 04D 00 00000010 0000001872 07BE 5052 MOVF 0x52,W 04C 00 04C 00 00000010 0000001873 07C0 264D ADDWF 0x4D 052 00 W -- 00000010 0000001874 Note that there was not attempt to respond to the interrupt. Note also that EXT0 is still low at the end of the trace, so I'd expect RB0 to show up as a 0 in the SFR window. The SFR window is below. sspstat 00 0 00000000 . sspcon1 00 0 00000000 . sspcon2 00 0 00000000 . adresh 00 0 00000000 . adresl 00 0 00000000 . adcon0 99 153 10011001 . adcon1 02 2 00000010 . ccpr1h 3C 60 00111100 < ccpr1l 1A 26 00011010 . ccp1con 0A 10 00001010 . ccpr2h 7F 127 01111111 ccpr2l FF 255 11111111 . ccp2con 00 0 00000000 . tmr3h FF 255 11111111 . tmr3l FF 255 11111111 . t3con 00 0 00000000 . spbrg 00 0 00000000 . rcreg 37 55 00110111 7 txreg 00 0 00000000 . txsta 02 2 00000010 . rcsta D1 209 11010001 . ipr2 0F 15 00001111 . pir2 00 0 00000000 . pie2 00 0 00000000 . ipr1 FF 255 11111111 . pir1 40 64 01000000 @ pie1 24 36 00100100 $ trise 00 0 00000000 . trisd FF 255 11111111 . trisc 80 128 10000000 . trisb 77 119 01110111 w trisa 3F 63 00111111 ? late 02 2 00000010 . latd F6 246 11110110 . latc 0F 15 00001111 . latb 00 0 00000000 . lata 01 1 00000001 . porte 02 2 00000010 . portd FE 254 11111110 . portc CF 207 11001111 . portb 07 7 00000111 . porta 10 16 00010000 . Note that the LSB of portb is still high! Note also that the LSB of trisb is high, so this should be an input. Any ideas??? Thanks! Harold FCC Rules Online at http://hallikainen.com/FccRules Lighting control for theatre and television at http://www.dovesystems.com ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/web/. -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics