Yes, but can i use a pause command in the interupt?
Code:
Disable ' interrupt handler
Handle:
if RCIF = 1 then ' serial intterupt
RCIF = 0 ' clearing interrupt flags
IF OERR THEN ' Clear over-runs if OERR set
CREN = 0 ' Disable USART receive
CREN = 1 ' Re-enable USART receive
ENDIF
'Serial commands.
endif
IF TMR0IF = 1 THEN 'RECEIVE all A/D value's
TMR0IF = 0
gosub CoversionsAD
gosub saftycontrol 'check al received value's
ENDIF
if TMR1IF = 1 then
TMR1IF = 0
gosub PacketSend
endif
TimeOut:
resume
enable
Bookmarks