I will try it on 690 soon. Please answer on 16F676 as well.
Here is my code for 676:
The led on Pin7 (in ISR) seems to be blinking at a constant rate BUT pin8 is erratic. Do I need to take care of any other setting as well? ThanksCode:Include "modedefs.bas" INCLUDE "DT_INTS-14.bas" INCLUDE "ReEnterPBP.bas" DEFINE OCS 4 DEFINE OSC_1K 1 @ __Config _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _BODEN & _CP & _CPD PAUSE 50 TRISA = %001000 TRISC = 0 PORTC = 0 PORTA = 0 CMCON = 7 ANSEL = 0 OPTION_REG=128 ASM INT_LIST macro ; IntSource, Label, Type, ResetFlag? INT_Handler TMR1_INT, _CHECK, PBP, yes endm INT_CREATE ; Creates the interrupt processor ENDASM T1CON=%00010001 @ INT_ENABLE TMR1_INT while 1 FOR code=1 TO 5 TOGGLE pin8 PAUSE 1000 NEXT code wend CHECK: toggle pin7 i=i+1 if i=2 then Portc=%000000 PORTC=0 i=0 endif @ INT_RETURN




Bookmarks