ho problemi a gestire l'interrupt sulla usart del pic16f876 con il picbasic, se uso il comando serin2, il programma non esce dalla subroutine dell'interrupt. qualcuno ha riscpntrato lo stesso problema? qualcuno ha qualche consiglio a darmi? grazie
TAST VAR WORD TAST2 VAR WORD DATO var word dato = 0 TAST = 0 tast2 = 0 RCREG = 0 A1 VAR WORD TONO VAR PORTB.0 PTT VAR PORTC.3 RX var PORTC.7 TX VAR PORTC.4 su var word ON INTERRUPT GOTO INTERR INTCON = %11000000 PIE1 = %00100000 RCSTA = %10011000
OUTPUT TONO OUTPUT PTT INPUT RX OUTPUT TX LOW PTT LOW TONO
HIGH PTT DTMFOUT TONO,500,0,[2] ENABLE
INIZIO: IF TAST2 = 16 THEN HIGH PTT DTMFOUT TONO,10,0,[2] GOTO INIZIO ENDIF
IF TAST2 = 32 THEN HIGH PTT DTMFOUT TONO,10,0,[8] GOTO INIZIO ENDIF
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.