09:39 PM 24/05/98 EDT, you wrote: >Hello! > >I testing this routine for decode a dtmf signal. It was funny because when >I used the simulator all works properly, but in the real world didn't work. > >Any idea. > >TIA. > >Gustavo >--------- >list p=16c55 >; >f0 equ 0 >rtcc equ 1 >pc equ 2 >status equ 3 >fsr equ 4 >porta equ 5 >portb equ 6 >portc equ 7 >reg1 equ 0B >reg2 equ 0C >reg3 equ 0D >aux equ 0E >acu equ 0F >; > org 0 > goto inicio >; >inicio movlw b'0011' > tris porta > movlw .64 > tris portb >; > movlw b'11111111' > tris portc >; > bcf status,6 > bcf status,7 >; > movlw .177 > movwf portb > nop > movlw .12 > movwf porta > nop >; >rst movlw .0 > movwf acu > movwf aux > >; >; >d_str btfsc porta,1 > goto d_str > nop > btfss portc,7 > goto d_str >; >delay movlw .80 > movwf reg1 >tres movlw .64 > movwf reg2 >dos movlw .48 > movwf reg3 > nop > nop > nop >uno btfsc portc,3 > goto cmd_3 > nop > nop > decfsz reg3 > goto uno > decfsz reg2 > goto dos > decfsz reg1 > goto tres > goto rst >; > >cmd_3 nop > nop > nop > bcf portb,0 > nop > nop >; > end > > I don't know what DTMF chip you are using, but what is happening at the end of CMD_3, you seem to just fall out, does this indicate that you have a DTMF digit? And where do you read the DTMF digit in? Do you simulate all possibilities of pin conditions? You also have infinite loop possibility in UNO, D_STR. Does the programme ever get to the CMD_3 part? Have you tried forcing the inputs to the expected levels? Dennis