Well I thought I had finally finished my trigger project, but after unsoldering the test points and soldering back in the resistor, it ceased working. After some investigation I had soldered everything back together with it turned on, I had also gotten a bridged joint. Needless to say I wanted to test the PIC. I wrote the attached ASM to basically oscillate the outputs and give me something to look at on the scope. I am expecting to see a square wave... The test circuit is literally VDD to +5v and VSS to 0v, nothing else. I was going to use the internal osc for this. Could someone take a look at it and tell me if my code might work at what I am trying, thanks... title "PIC16F627 e-trigger" list p=16f627,f=inhx32 #include __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_OFF & _BODEN_OFF & _CP_OFF & _DATA_CP_OFF & _LVP_OFF & _MCLRE_OFF CBLOCK 0x20 rolls state ENDC org 00h goto Start org 04h BCF INTCON,T0IF ;clear the flag DECFSZ rolls,1 GOTO END_INT BTFSC state,0 GOTO TURN_OFF TURN_ON BSF state,0 MOVLW 0xFF MOVWF PORTA MOVWF PORTB GOTO END_INT TURN_OFF BCF state,0 MOVLW 0 MOVWF PORTA MOVWF PORTB END_INT RETFIE Start ; turn off the comparators MOVLW 0x07 MOVWF CMCON ; switch to bank 1 to affect the TRIS registers BCF STATUS,RP1 BSF STATUS,RP0 ;select bank1 ; set A and B as outputs MOVLW 0x00 MOVWF TRISA MOVWF TRISB ; Make the timer a timer not a counter... BCF OPTION_REG,T0CS ; Back to bank 0 BCF STATUS,RP0 MOVLW 0 MOVWF rolls MOVWF state ; enable tmr0 interrupts BSF INTCON,T0IE ; turn them on BSF INTCON,GIE ; enter an endless loop, here we go to interrupt ; based operation. LOOP GOTO LOOP END -- Anthony Toft -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu